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