Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jul 2019 16:12:14 +0000
From:      bugzilla-noreply@freebsd.org
To:        powerpc@FreeBSD.org
Subject:   [Bug 239266] lang/gcc8 fails to build with clang8: tree-vect-loop.c:4979:12: error: expected unqualified-id
Message-ID:  <bug-239266-25139-8zkGuQPFNy@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-239266-25139@https.bugs.freebsd.org/bugzilla/>
References:  <bug-239266-25139@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239266

--- Comment #5 from Leandro Lupori <leandro.lupori@gmail.com> ---
Created attachment 205872
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D205872&action=
=3Dedit
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 generat=
ing
ELFv1 code and trying to link with ELFv2 libs.

I've tried to fix this by passing -mabi=3Delfv2 in CFLAGS, with the followi=
ng
Makefile change:

65c65
< MAKE_ARGS+=3D   CFLAGS_FOR_TARGET=3D"-O1" CXXFLAGS_FOR_TARGET=3D"-O1"
BOOT_CFLAGS=3D"-O1" # PR235975
---
> MAKE_ARGS+=3D	CFLAGS_FOR_TARGET=3D"-O1 -mabi=3Delfv2" CXXFLAGS_FOR_TARGET=
=3D"-O1 -mabi=3Delfv2" BOOT_CFLAGS=3D"-O1 -mabi=3Delfv2" # 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=3Dlink
/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=3Delfv2 -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=20
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/allo=
c.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/ti=
me.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=20
-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=3Delfv2 -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/opena=
cc.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.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-239266-25139-8zkGuQPFNy>