Makefile revision 1.12
1# $NetBSD: Makefile,v 1.12 2016/03/23 00:20:18 mrg Exp $ 2 3USE_SHLIBDIR= yes 4REQUIRETOOLS= yes 5NOLINT= # defined 6 7LIB= gcc_s 8NOSTATICLIB= # defined 9NOPROFILE= # defined 10NOPICINSTALL= # defined 11 12.include "../../../Makefile.gcc_path" 13.include <bsd.own.mk> 14 15.if ${MKGCC} != "no" 16 17.cc: # disable .cc->NULL transform 18 19SHLIB_MAJOR= 1 20SHLIB_MINOR= 0 21 22LDFLAGS+= -nodefaultlibs 23LDFLAGS+= -Wl,--version-script=${.OBJDIR}/libgcc.map 24 25# XXX handle this better? GCC 4.8 moved them. 26.if ${MACHINE} == "emips" 27LIB2ADD_HACK+= ${GNUHOSTDIST}/gcc/config/floatunsidf.c \ 28 ${GNUHOSTDIST}/gcc/config/floatunsisf.c 29.endif 30 31SRCS+= ${LIB2FUNCS} ${LIB2DIVMOD} ${LIB2_EH} ${LIB2_EHASM} \ 32 ${G_LIB2ADD:T:S/.asm/.S/} \ 33 ${LIB2ADD_HACK:T:S/.asm/.S/} \ 34 ${G_LIB2ADD_ST:T} ${LIB1ASMFUNCS} 35 36COPTS.unwind-dw2.c = -Wno-stack-protector 37 38DPADD+= libgcc.map 39CLEANFILES+= libgcc.map 40 41.include <bsd.lib.mk> 42 43.if ${MKPICLIB} != "no" 44LIBGCC_S_OBJS= ${SOBJS} 45.else 46LIBGCC_S_OBJS= ${OBJS} 47.endif 48 49LIBGCC_STD_VER_IN= ${GNUHOSTDIST}/libgcc/libgcc-std.ver.in 50CLEANFILES+= libgcc-std.ver 51 52libgcc-std.ver: ${LIBGCC_STD_VER_IN} 53 ${_MKTARGET_CREATE} 54 ${TOOL_SED} -e 's/__PFX__/__/g' -e 's/__FIXPTPFX__/__/g' < ${LIBGCC_STD_VER_IN} > ${.TARGET}.tmp 55 mv ${.TARGET}.tmp ${.TARGET} 56 57libgcc.map: ${LIBGCC_S_OBJS} ${G_SHLIB_MKMAP} ${G_SHLIB_MAPFILES} 58 { \ 59 ${NM} ${G_SHLIB_NM_FLAGS} ${LIBGCC_S_OBJS}; \ 60 echo %%; \ 61 for f in ${G_SHLIB_MAPFILES}; do \ 62 if [ -f ${.OBJDIR}/$${f} ]; then \ 63 cat ${.OBJDIR}/$${f}; \ 64 else \ 65 cat $${f}; \ 66 fi; \ 67 done | \ 68 ${TOOL_SED} -e "/^[ ]*#/d" \ 69 -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' | \ 70 ${CC} ${G_LIBGCC2_CFLAGS} ${G_INCLUDES} -E -xassembler-with-cpp -; \ 71 } | ${TOOL_AWK} -f ${G_SHLIB_MKMAP} > ${.TARGET}.tmp 72 mv ${.TARGET}.tmp ${.TARGET} 73 74.else 75.include <bsd.prog.mk> # do nothing 76.endif 77