Apply a fix, extracted from the UCB RISC-V gcc sources, for the (known)

problems with compiling atomics for the riscv64 target with gcc.  Remove
the now-unneeded workarounds for the 2 files in libasan that were formerly
failing to compile with the optimizer turned on.
This commit is contained in:
dennis 2014-12-22 21:15:48 +00:00
parent 8694ecf440
commit 298eb8b514
2 changed files with 1 additions and 7 deletions

View File

@ -166,7 +166,7 @@
rtx result = operands[0];
rtx mem = operands[1];
rtx model = operands[2];
rtx addr = XEXP (mem, 0);
rtx addr = force_reg (Pmode, XEXP (mem, 0));
rtx aligned_addr = gen_reg_rtx (Pmode);
emit_move_insn (aligned_addr, gen_rtx_AND (Pmode, addr, GEN_INT (-4)));

View File

@ -56,10 +56,4 @@ CPPFLAGS.sanitizer_netbsd.cc+=-I${GCCDIST}/gcc/ginclude
LIBDPLIBS+= stdc++ ${.CURDIR}/../libstdc++-v3
LIBDPLIBS+= pthread ${.CURDIR}/../../../../../lib/libpthread
# Work around riscv compiler bugs in (at least) gcc 4.8.3
.if ${MACHINE_ARCH} == "riscv64"
COPTS.asan_allocator2.cc += -O0
COPTS.sanitizer_netbsd.cc += -O0
.endif
.include <bsd.lib.mk>