gcc 4.4: Remove PIE profiling trigger
[dragonfly.git] / lib / csu / i386 / Makefile.csu
index 519b567..a36a188 100644 (file)
@@ -1,17 +1,29 @@
 # $FreeBSD: src/lib/csu/i386-elf/Makefile,v 1.6.2.5 2002/11/23 17:44:29 ru Exp $
-# $DragonFly: src/lib/csu/i386/Makefile.csu,v 1.1 2007/01/15 18:01:44 corecode Exp $
 
-CSUDIR?=       ${.CURDIR}
+SRCS+=         crti.S crtn.S
+OBJS+=         gcrt1.o crt1.o Scrt1.o
+INSTALLOBJS+=  crt1.o crti.o crtn.o gcrt1.o Scrt1.o
+CLEANFILES+=   crt1.o crti.o crtn.o gcrt1.o Scrt1.o \
+               crt1_c.o crt1_s.o gcrtl_c.o Scrt1_c.o
+WARNS?=                2
 
-SRCS+=         crt1.c crti.S crtn.S
-OBJS+=         gcrt1.o
-INSTALLOBJS+=  crt1.o crti.o crtn.o gcrt1.o
-
-CFLAGS+=       -elf -Wall -fkeep-inline-functions \
-               -I${CSUDIR}/../common
-LDFLAGS+=      -elf
+CFLAGS+=       -I${CSUDIR}/../common
 
 .PATH:         ${CSUDIR} ${CSUDIR}/../common
 
-gcrt1.o:       crt1.c
-       ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${CSUDIR}/crt1.c
+gcrt1_c.o:     crt1_c.c
+       ${CC} ${CFLAGS} -DGCRT -c -o gcrt1_c.o ${CSUDIR}/crt1_c.c
+
+gcrt1.o:       gcrt1_c.o crt1_s.o
+       ${LD} ${LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o
+
+crt1.o:                crt1_c.o crt1_s.o
+       ${LD} ${LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o
+       objcopy --localize-symbol _start1 crt1.o
+
+Scrt1_c.o:     crt1_c.c
+       ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1_c.o ${CSUDIR}/crt1_c.c
+
+Scrt1.o:       Scrt1_c.o crt1_s.o
+       ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o
+       objcopy --localize-symbol _start1 Scrt1.o