freebsd-dev/lib/csu/powerpc64/Makefile
Bryan Drewery 7c6cc9de3a Fix installation of 32bit libraries after r288074.
FILES is not used when LIBRARIES_ONLY is set, which is used to build and
install the lib32 sysroot.  All of the csu files do quality as "libraries"
for this case so just undefine LIBRARIES_ONLY.

This is still better than the previous realinstall handling as it does
not hook into META_MODE properly.

Sponsored by:	EMC / Isilon Storage Division
2015-09-21 21:44:02 +00:00

55 lines
1.4 KiB
Makefile

# $FreeBSD$
.PATH: ${.CURDIR}/../common
SRCS= crt1.c crti.S crtn.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= Scrt1.o gcrt1.o
CFLAGS+= -I${.CURDIR}/../common \
-I${.CURDIR}/../../libc/include \
-mlongcall
# XXX: See the log for r232932 as to why the above -mlongcall is needed. Since
# clang doesn't support -mlongcall, and testing shows a clang linked with a
# clang-built csu segfaults, this must currently be compiled with gcc. Once
# clang supports -mlongcall, or we get a fixed ld, this can be revisited.
CC:= gcc
COMPILER_TYPE:= gcc
FILES= ${OBJS}
FILESMODE= ${LIBMODE}
FILESOWN= ${LIBOWN}
FILESGRP= ${LIBGRP}
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
# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not
# directly compiled to .o files.
crt1.s: crt1.c
${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c
sed ${SED_FIX_NOTE} ${.TARGET}
crt1.o: crt1.s
${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s
gcrt1.s: crt1.c
${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c
sed ${SED_FIX_NOTE} ${.TARGET}
gcrt1.o: gcrt1.s
${CC} ${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} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
.include <bsd.lib.mk>