[Bug 239266] lang/gcc8 fails to build with clang8: tree-vect-loop.c:4979:12: error: expected unqualified-id
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Jul 18 16:12:15 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266
--- Comment #5 from Leandro Lupori <leandro.lupori at gmail.com> ---
Created attachment 205872
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=205872&action=edit
gcc8 vec_step fix
Ok, with the attached patch I'm able to go further in gcc8 build.
But then when xgcc starts to be used, I get errors, because xgcc is generating
ELFv1 code and trying to link with ELFv2 libs.
I've tried to fix this by passing -mabi=elfv2 in CFLAGS, with the following
Makefile change:
65c65
< MAKE_ARGS+= CFLAGS_FOR_TARGET="-O1" CXXFLAGS_FOR_TARGET="-O1"
BOOT_CFLAGS="-O1" # PR235975
---
> MAKE_ARGS+= CFLAGS_FOR_TARGET="-O1 -mabi=elfv2" CXXFLAGS_FOR_TARGET="-O1 -mabi=elfv2" BOOT_CFLAGS="-O1 -mabi=elfv2" # PR235975
The build then goes further, but fails with the following error:
gmake[7]: Entering directory
'/usr/ports/lang/gcc8/work/.build/powerpc64-portbld-freebsd13.0/libgomp'
/bin/sh ./libtool --tag CC --mode=link
/usr/ports/lang/gcc8/work/.build/./gcc/xgcc
-B/usr/ports/lang/gcc8/work/.build/./gcc/
-B/usr/local/powerpc64-portbld-freebsd13.0/bin/
-B/usr/local/powerpc64-portbld-freebsd13.0/lib/ -isystem
/usr/local/powerpc64-portbld-freebsd13.0/include -isystem
/usr/local/powerpc64-portbld-freebsd13.0/sys-include -Wall -Werror
-Wc,-pthread -O1 -mabi=elfv2 -lpthread -Wl,-O1 -o libgomp.la -version-info
1:0:0 -Wl,--version-script,libgomp.ver -rpath /usr/local/lib/gcc8 alloc.lo
atomic.lo barrier.lo critical.lo env.lo error.lo icv.lo icv-device.lo iter.lo
iter_ull.lo loop.lo loop_ull.lo ordered.lo parallel.lo sections.lo single.lo
task.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo bar.lo ptrlock.lo
time.lo fortran.lo affinity.lo target.lo splay-tree.lo libgomp-plugin.lo
oacc-parallel.lo oacc-host.lo oacc-init.lo oacc-mem.lo oacc-async.lo
oacc-plugin.lo oacc-cuda.lo priority_queue.lo openacc.lo -ldl
libtool: link: /usr/ports/lang/gcc8/work/.build/./gcc/xgcc
-B/usr/ports/lang/gcc8/work/.build/./gcc/
-B/usr/local/powerpc64-portbld-freebsd13.0/bin/
-B/usr/local/powerpc64-portbld-freebsd13.0/lib/ -isystem
/usr/local/powerpc64-portbld-freebsd13.0/include -isystem
/usr/local/powerpc64-portbld-freebsd13.0/sys-include -shared .libs/alloc.o
.libs/atomic.o .libs/barrier.o .libs/critical.o .libs/env.o .libs/error.o
.libs/icv.o .libs/icv-device.o .libs/iter.o .libs/iter_ull.o .libs/loop.o
.libs/loop_ull.o .libs/ordered.o .libs/parallel.o .libs/sections.o
.libs/single.o .libs/task.o .libs/team.o .libs/work.o .libs/lock.o
.libs/mutex.o .libs/proc.o .libs/sem.o .libs/bar.o .libs/ptrlock.o .libs/time.o
.libs/fortran.o .libs/affinity.o .libs/target.o .libs/splay-tree.o
.libs/libgomp-plugin.o .libs/oacc-parallel.o .libs/oacc-host.o
.libs/oacc-init.o .libs/oacc-mem.o .libs/oacc-async.o .libs/oacc-plugin.o
.libs/oacc-cuda.o .libs/priority_queue.o .libs/openacc.o -lpthread -ldl
-B/usr/ports/lang/gcc8/work/.build/./gcc/
-B/usr/local/powerpc64-portbld-freebsd13.0/bin/
-B/usr/local/powerpc64-portbld-freebsd13.0/lib/ -pthread -mabi=elfv2 -Wl,-O1
-Wl,--version-script -Wl,libgomp.ver -Wl,-soname -Wl,libgomp.so.1 -o
.libs/libgomp.so.1.0.0
/usr/local/bin/ld: .libs/openacc.o: ABI version 1 is not compatible with ABI
version 2 output
/usr/local/bin/ld: failed to merge target specific data of file .libs/openacc.o
collect2: error: ld returned 1 exit status
gmake[7]: *** [Makefile:594: libgomp.la] Error 1
gmake[7]: Leaving directory
'/usr/ports/lang/gcc8/work/.build/powerpc64-portbld-freebsd13.0/libgomp'
gmake[6]: *** [Makefile:904: all-recursive] Error 1
So apparently some objects are still being build with ELFv1 ABI.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-ppc
mailing list