Makefile revision 1.8
1# $NetBSD: Makefile,v 1.8 2014/03/01 10:00:36 mrg 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 49 50libgcc-std.ver: ${LIBGCC_STD_VER_IN} 51 ${_MKTARGET_CREATE} 52 ${TOOL_SED} -e 's/__PFX__/__/g' -e 's/__FIXPTPFX__/__/g' < ${LIBGCC_STD_VER_IN} > ${.TARGET}.tmp 53 mv ${.TARGET}.tmp ${.TARGET} 54 55libgcc.map: ${LIBGCC_S_OBJS} ${G_SHLIB_MKMAP} ${G_SHLIB_MAPFILES} 56 { \ 57 ${NM} ${G_SHLIB_NM_FLAGS} ${LIBGCC_S_OBJS}; \ 58 echo %%; \ 59 for f in ${G_SHLIB_MAPFILES}; do \ 60 if [ -f ${.OBJDIR}/$${f}]; then \ 61 cat ${.OBJDIR}/$${f}; \ 62 else \ 63 cat $${f}; \ 64 fi; \ 65 done | \ 66 ${TOOL_SED} -e "/^[ ]*#/d" \ 67 -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' | \ 68 ${CC} ${G_LIBGCC2_CFLAGS} ${G_INCLUDES} -E -xassembler-with-cpp -; \ 69 } | ${TOOL_AWK} -f ${G_SHLIB_MKMAP} > ${.TARGET}.tmp 70 mv ${.TARGET}.tmp ${.TARGET} 71 72.else 73.include <bsd.prog.mk> # do nothing 74.endif 75