Makefile revision 1.7
1# $NetBSD: Makefile,v 1.7 2014/02/26 09:54:32 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? 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 ${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.map: ${LIBGCC_S_OBJS} ${G_SHLIB_MKMAP} ${G_SHLIB_MAPFILES} 49 { \ 50 ${NM} ${G_SHLIB_NM_FLAGS} ${LIBGCC_S_OBJS}; \ 51 echo %%; \ 52 cat ${G_SHLIB_MAPFILES} | \ 53 ${TOOL_SED} -e "/^[ ]*#/d" \ 54 -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' | \ 55 ${CC} ${G_LIBGCC2_CFLAGS} ${G_INCLUDES} -E -xassembler-with-cpp -; \ 56 } | ${TOOL_AWK} -f ${G_SHLIB_MKMAP} > ${.TARGET}.tmp 57 mv ${.TARGET}.tmp ${.TARGET} 58 59.else 60.include <bsd.prog.mk> # do nothing 61.endif 62