Makefile revision 1.2
1# $NetBSD: Makefile,v 1.2 2011/07/10 02:39:57 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.if !defined(MKNATIVE_LIBGCC_NEW) 25 26# XXX handle this better? 27.if ${MACHINE_CPU} == "mips" && !(${MKSOFTFLOAT} != "no") 28G_LIB2ADD+= ${GNUHOSTDIST}/gcc/config/floatunsidf.c \ 29 ${GNUHOSTDIST}/gcc/config/floatunsisf.c 30.endif 31 32SRCS+= ${LIB2FUNCS} ${LIB2DIVMOD} ${LIB2_EH} \ 33 ${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS} 34 35.else # defined(MKNATIVE_LIBGCC_NEW) 36 37.include "../Makefile.srcs" 38 39# New style. 40TMPLSRCS= ${TMPLSRCS.libgcc_s.so} 41TMPLFPSRCS= ${TMPLFPSRCS.libgcc_s.so} 42TMPLASMSRCS= ${TMPLASMSRCS.libgcc_s.so} 43SRCS= ${SRCS.libgcc_s.so} 44 45.include "../Makefile.wrapper" 46 47.endif # defined(MKNATIVE_LIBGCC_NEW) 48 49COPTS.unwind-dw2.c = -Wno-stack-protector 50 51DPADD+= libgcc.map 52CLEANFILES+= libgcc.map 53 54.include <bsd.lib.mk> 55 56.if ${MKPICLIB} != "no" 57LIBGCC_S_OBJS= ${SOBJS} 58.else 59LIBGCC_S_OBJS= ${OBJS} 60.endif 61 62libgcc.map: ${LIBGCC_S_OBJS} ${G_SHLIB_MKMAP} ${G_SHLIB_MAPFILES} 63 { \ 64 ${NM} ${G_SHLIB_NM_FLAGS} ${LIBGCC_S_OBJS}; \ 65 echo %%; \ 66 cat ${G_SHLIB_MAPFILES} | \ 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