aboutsummaryrefslogtreecommitdiff
path: root/lib/csu/mips
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2020-06-15 19:38:48 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2020-06-15 19:38:48 +0000
commit99282790b7d01ec3c4072621d46a0d7302517ad4 (patch)
tree2b60e6b6545502b508440321628421a3d4019baa /lib/csu/mips
parentad54157b5e060ae38035f960dcb4dc824e772446 (diff)
Notes
Diffstat (limited to 'lib/csu/mips')
-rw-r--r--lib/csu/mips/Makefile37
-rw-r--r--lib/csu/mips/crt1_c.c (renamed from lib/csu/mips/crt1.c)1
2 files changed, 14 insertions, 24 deletions
diff --git a/lib/csu/mips/Makefile b/lib/csu/mips/Makefile
index df1fe6e2343bd..18434ef750114 100644
--- a/lib/csu/mips/Makefile
+++ b/lib/csu/mips/Makefile
@@ -2,9 +2,9 @@
.PATH: ${.CURDIR:H}/common
-SRCS= crt1.c crti.S crtn.S
+SRCS= crti.S crtn.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
-OBJS+= Scrt1.o gcrt1.o
+OBJS+= Scrt1.o crt1.o gcrt1.o
CFLAGS+= -I${.CURDIR:H}/common \
-I${SRCTOP}/lib/libc/include
CFLAGS+= -DCRT_IRELOC_SUPPRESS
@@ -17,31 +17,22 @@ FILESDIR= ${LIBDIR}
# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY.
.undef LIBRARIES_ONLY
-CLEANFILES= ${OBJS}
-CLEANFILES+= crt1.s gcrt1.s Scrt1.s
+CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o
+CLEANFILES+= crtbrand.o ignore_init_note.o
-# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not
-# directly compiled to .o files.
+gcrt1_c.o: crt1_c.c
+ ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c
-crt1.s: crt1.c
- ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c
- sed ${SED_FIX_NOTE} ${.TARGET}
+gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o
+ ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o
-crt1.o: crt1.s
- ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} crt1.s
+crt1.o: crt1_c.o crtbrand.o ignore_init_note.o
+ ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o
-gcrt1.s: crt1.c
- ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c
- sed ${SED_FIX_NOTE} ${.TARGET}
+Scrt1_c.o: crt1_c.c
+ ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c
-gcrt1.o: gcrt1.s
- ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s
-
-Scrt1.s: crt1.c
- ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c
- sed ${SED_FIX_NOTE} ${.TARGET}
-
-Scrt1.o: Scrt1.s
- ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
+Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o
+ ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o
.include <bsd.lib.mk>
diff --git a/lib/csu/mips/crt1.c b/lib/csu/mips/crt1_c.c
index 0f7fe1433ed35..b753f7b707bd5 100644
--- a/lib/csu/mips/crt1.c
+++ b/lib/csu/mips/crt1_c.c
@@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include "libc_private.h"
-#include "crtbrand.c"
#include "ignore_init.c"
struct Struct_Obj_Entry;