Changeset View
Changeset View
Standalone View
Standalone View
lib/csu/amd64/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
.PATH: ${.CURDIR:H}/common | .PATH: ${.CURDIR:H}/common | ||||
SRCS= crti.S crtn.S | CFLAGS+= -I${.CURDIR} | ||||
OBJS= ${SRCS:N*.h:R:S/$/.o/g} | |||||
OBJS+= Scrt1.o crt1.o gcrt1.o | |||||
CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/common \ | |||||
-I${SRCTOP}/lib/libc/include | |||||
CFLAGS+= -fno-omit-frame-pointer -DCRT_IRELOC_RELA | CFLAGS+= -fno-omit-frame-pointer -DCRT_IRELOC_RELA | ||||
FILES= ${OBJS} | CRT1OBJS= crtbrand.o ignore_init_note.o | ||||
jhb: crtbrand.o is surely MI, but I'm not sure if ignore_init is MI as well or if it should remain… | |||||
kibUnsubmitted Not Done Inline ActionsIn theory it is up to the compiler (i.e. not even part of the ABI). Practically, I remember that gcc auto-detects where the constructors are called, from crt1 or by ld-elf.so, and adapts to the platform. And glibc was converted to contructors from ld-elf, which was the reason why we followed the suit. I think we can claim that not calling constructors from crt is no longer MD. kib: In theory it is up to the compiler (i.e. not even part of the ABI). Practically, I remember… | |||||
FILESMODE= ${LIBMODE} | |||||
FILESOWN= ${LIBOWN} | |||||
FILESGRP= ${LIBGRP} | |||||
FILESDIR= ${LIBDIR} | |||||
# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. | |||||
.undef LIBRARIES_ONLY | |||||
CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o | |||||
CLEANFILES+= crtbrand.o ignore_init_note.o | |||||
gcrt1_c.o: crt1_c.c | |||||
${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c | |||||
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_c.o crtbrand.o ignore_init_note.o | |||||
${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o | |||||
Scrt1_c.o: crt1_c.c | |||||
${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c | |||||
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> | .include <bsd.lib.mk> |
crtbrand.o is surely MI, but I'm not sure if ignore_init is MI as well or if it should remain MD (all arch do it, but I'm not sure if that's by design).