Makefile revision 1.3
1# $NetBSD: Makefile,v 1.3 2011/08/15 09:19:21 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.if ${MACHINE_CPU} == "mips" && !(${MKSOFTFLOAT} != "no") 26G_LIB2ADD+= ${GNUHOSTDIST}/gcc/config/floatunsidf.c \ 27 ${GNUHOSTDIST}/gcc/config/floatunsisf.c 28.endif 29 30SRCS+= ${LIB2FUNCS} ${LIB2DIVMOD} ${LIB2_EH} \ 31 ${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS} 32 33COPTS.unwind-dw2.c = -Wno-stack-protector 34 35DPADD+= libgcc.map 36CLEANFILES+= libgcc.map 37 38.include <bsd.lib.mk> 39 40.if ${MKPICLIB} != "no" 41LIBGCC_S_OBJS= ${SOBJS} 42.else 43LIBGCC_S_OBJS= ${OBJS} 44.endif 45 46libgcc.map: ${LIBGCC_S_OBJS} ${G_SHLIB_MKMAP} ${G_SHLIB_MAPFILES} 47 { \ 48 ${NM} ${G_SHLIB_NM_FLAGS} ${LIBGCC_S_OBJS}; \ 49 echo %%; \ 50 cat ${G_SHLIB_MAPFILES} | \ 51 ${TOOL_SED} -e "/^[ ]*#/d" \ 52 -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' | \ 53 ${CC} ${G_LIBGCC2_CFLAGS} ${G_INCLUDES} -E -xassembler-with-cpp -; \ 54 } | ${TOOL_AWK} -f ${G_SHLIB_MKMAP} > ${.TARGET}.tmp 55 mv ${.TARGET}.tmp ${.TARGET} 56 57.else 58.include <bsd.prog.mk> # do nothing 59.endif 60