Changeset View
Standalone View
lib/libgcc_s/Makefile
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
# is the same size as double. | # is the same size as double. | ||||
.if ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "arm" && \ | .if ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "arm" && \ | ||||
${MACHINE_CPUARCH} != "powerpc" | ${MACHINE_CPUARCH} != "powerpc" | ||||
SRCS+= s_fmaxl.c | SRCS+= s_fmaxl.c | ||||
SRCS+= s_logbl.c | SRCS+= s_logbl.c | ||||
SRCS+= s_scalbnl.c | SRCS+= s_scalbnl.c | ||||
.endif | .endif | ||||
# Remove all duplicate sources | |||||
SRCS:= ${SRCS:O:u} | |||||
emaste: Where do the duplicates come from? Perhaps we could just avoid adding the dups in the first… | |||||
arichardsonAuthorUnsubmitted Done Inline ActionsThe two include lines above seem to add duplicates. I think it might be a bit awkward to remove the duplicates but I can look into that tomorrow. .include "../libcompiler_rt/Makefile.inc" .include "../libgcc_eh/Makefile.inc" arichardson: The two include lines above seem to add duplicates. I think it might be a bit awkward to remove… | |||||
emasteUnsubmitted Not Done Inline ActionsOK - then I think it's reasonable to commit this one for now, and we can later look at avoiding the duplicates and removing this again. emaste: OK - then I think it's reasonable to commit this one for now, and we can later look at avoiding… | |||||
arichardsonAuthorUnsubmitted Done Inline ActionsSeems like the problem is gcc_personality_v0 which is included in both the compiler_rt and libgcc_eh makefile.inc. @dim does it need to be in both? It seems like on Linux libgcc (i.e. libcompiler_rt) doesn't provide it, only libgcc_eh (and libgcc_s.so.1) include it. /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a:morestack.o: 0000000000000000 V DW.ref.__gcc_personality_v0 /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a:morestack.o: U __gcc_personality_v0 /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_eh.a:unwind-c.o: 00000000000001b0 T __gcc_personality_v0 arichardson: Seems like the problem is gcc_personality_v0 which is included in both the compiler_rt and… | |||||
dimUnsubmitted Not Done Inline ActionsGood question. A very long time ago in rS276851, I added compiler-rt trunk r276851, and at that point added the gcc_personality_v0.c file to what was then lib/libcompiler_rt/Makefile. (This got renamed to Makefile.inc later.) Then in rS307230, @emaste added the scaffolding Makefiles for libgcc_eh and libgcc_s based on compiler-rt, and this initial version also contained an entry for gcc_personality_v0.c. I am unsure which library is *supposed* to provide it, though. Upstream compiler-rt places it in its lib/builtins directory, which typically goes in to libcompiler_rt.a. Note that gcc_personality_v0.c has a comment added by @cem in rS354347, related to this: * XXX On FreeBSD, this file is compiled into three libraries: * - libcompiler_rt * - libgcc_eh * - libgcc_s * * In the former, the include path points to the contrib/libcxxrt/unwind-arm.h * copy of unwind.h. In the latter, the include path points to the * contrib/libunwind/include/unwind.h header (LLVM libunwind). * * Neither (seemingly redundant) variant of unwind.h needs the redefinitions * provided in the "helpful" header below, and libcxxrt's unwind-arm.h provides * *no* useful distinguishing macros, so just forcibly disable the helper * header on FreeBSD. */ So this may indeed be some historical mistake. I'd say it only belongs in libcompiler_rt proper, that is, libcompiler_rt.a and libgcc_s.so, and not in libgcc_eh.a. But it is possible that it must also be available in libgcc_eh.a for compatibility reasons. dim: Good question. A very long time ago in rS276851, I added compiler-rt trunk r276851, and at that… | |||||
cemUnsubmitted Not Done Inline ActionsIf we remove gcc_personality_v0 from libcompiler_rt, can this SRCS deduplication line be removed? cem: If we remove gcc_personality_v0 from libcompiler_rt, can this SRCS deduplication line be… | |||||
arichardsonAuthorUnsubmitted Done Inline Actions
Yes I believe that was the only duplicate. Will check shortly. arichardson: > If we remove gcc_personality_v0 from libcompiler_rt, can this SRCS deduplication line be… | |||||
.include <bsd.lib.mk> | .include <bsd.lib.mk> |
Where do the duplicates come from? Perhaps we could just avoid adding the dups in the first place, although perhaps that's awkward and this is fine.