Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 May 2016 15:32:23 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Mark Millard <markmi@dsl-only.net>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, freebsd-ports@freebsd.org
Subject:   Re: 11.0-CURRENT -r300770 libc++ update vs. lang/powerpc64-xtoolchain-gcc: no go [self hosted powerpc64 context]
Message-ID:  <B291643F-B423-48FE-9A45-B25F1495C879@FreeBSD.org>
In-Reply-To: <0C88C11C-154A-459B-98EB-2A80A166DBCE@dsl-only.net>
References:  <95E2A9D6-8E1A-46FB-84FF-60927A6F1CE4@dsl-only.net> <8FAD594D-4349-4EA7-A712-D3792537FB1D@FreeBSD.org> <C5678741-F12B-4234-A194-AC2F0B0CDAB4@dsl-only.net> <42773110-C392-4168-9B94-6902807DB530@dsl-only.net> <3BAE82F4-3BF4-4F02-9BFF-3F2290D3C82D@dsl-only.net> <0C88C11C-154A-459B-98EB-2A80A166DBCE@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_FF5AB575-B720-48C8-976E-25288B17E822
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 28 May 2016, at 06:18, Mark Millard <markmi@dsl-only.net> wrote:
...
> The -r300886 powerpc64 devel/powerpc64-gcc combination with no clang =
build included has failed:
>=20
> --- all_subdir_usr.bin ---
> endian.h(111): warning: bitwise operation on signed value possibly =
nonportable [117]
> endian.h(127): warning: extra bits set to 0 in conversion of 'unsigned =
int' to 'unsigned long long', op & [309]
> types.h(316): warning: bitwise operation on signed value possibly =
nonportable [117]
> types.h(317): warning: bitwise operation on signed value possibly =
nonportable [117]
> types.h(318): warning: bitwise operation on signed value possibly =
nonportable [117]
> types.h(319): warning: bitwise operation on signed value possibly =
nonportable [117]
> types.h(355): warning: conversion to 'unsigned int' due to prototype, =
arg #1 [259]
> types.h(355): warning: conversion from 'unsigned long long' to =
'unsigned int' may lose accuracy, arg #1 [298]
> types.h(355): warning: conversion to 'unsigned int' due to prototype, =
arg #1 [259]
> types.h(355): warning: conversion from 'unsigned long long' to =
'unsigned int' may lose accuracy, arg #1 [298]
> stdarg.h(40): syntax error [249]
> stdarg.h(98): syntax error [249]
> llib-lposix(307): syntax error [249]
> llib-lposix(308): syntax error [249]
> llib-lposix(309): syntax error [249]
> llib-lposix(309): cannot recover from previous errors [224]
> *** [llib-lposix.ln] Error code 1

For me, r300886 didn't build at all, when I tried:

CROSS_TOOLCHAIN=3Dpowerpc64-gcc TARGET=3Dpowerpc TARGET_ARCH=3Dpowerpc64 =
\
    __MAKE_CONF=3D/dev/null SRCCONF=3D/dev/null make buildworld

It always errors out at the very first file built for the libraries
stage:

--------------------------------------------------------------
>>> stage 4.2: building libraries
--------------------------------------------------------------
cd /usr/src;  CROSS_TOOLCHAIN=3D"powerpc64-gcc" =
MAKEOBJDIRPREFIX=3D/usr/obj  MACHINE_ARCH=3Di386  MACHINE=3Di386  =
CPUTYPE=3D GROFF_BIN_PATH=3D/usr/obj/usr/src/tmp/legacy/usr/bin  =
GROFF_FONT_PATH=3D/usr/obj/usr/src/tmp/legacy/usr/share/groff_font  =
GROFF_TMAC_PATH=3D/usr/obj/usr/src/tmp/legacy/usr/share/tmac =
CC=3D"/usr/local/bin/powerpc64-portbld-freebsd11.0-gcc =
--sysroot=3D/usr/obj/usr/src/tmp -B/usr/local/powerpc64-freebsd/bin/" =
CXX=3D"/usr/local/bin/powerpc64-portbld-freebsd11.0-g++  =
--sysroot=3D/usr/obj/usr/src/tmp -B/usr/local/powerpc64-freebsd/bin/"  =
CPP=3D"/usr/local/bin/powerpc64-portbld-freebsd11.0-cpp =
--sysroot=3D/usr/obj/usr/src/tmp -B/usr/local/powerpc64-freebsd/bin/"  =
AS=3D"/usr/local/powerpc64-freebsd/bin/as" =
AR=3D"/usr/local/powerpc64-freebsd/bin/ar" =
LD=3D"/usr/local/powerpc64-freebsd/bin/ld" =
NM=3D/usr/local/powerpc64-freebsd/bin/nm  =
OBJDUMP=3D/usr/local/powerpc64-freebsd/bin/objdump =
OBJCOPY=3D"/usr/local/powerpc64-freebsd/bin/objcopy"  =
RANLIB=3D/usr/local/powerpc64-freebsd/bin/ranlib =
STRINGS=3D/usr/local/powerpc64-freebsd/bin/  =
SIZE=3D"/usr/local/powerpc64-freebsd/bin/size"  INSTALL=3D"sh =
/usr/src/tools/install.sh"  =
PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/us=
r/bin:/usr/obj/usr/src/tmp/legacy/bin:/usr/obj/usr/src/tmp/usr/sbin:/usr/o=
bj/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin make  -f =
Makefile.inc1 DESTDIR=3D/usr/obj/usr/src/tmp -DNO_FSCHG MK_HTML=3Dno =
-DNO_LINT MK_MAN=3Dno  MK_PROFILE=3Dno MK_TESTS=3Dno =
MK_TESTS_SUPPORT=3Dyes libraries
cd /usr/src;  make -f Makefile.inc1 _prereq_libs;  make -f Makefile.inc1 =
_startup_libs;  make -f Makefile.inc1 _prebuild_libs;  make -f =
Makefile.inc1 _generic_libs
=3D=3D=3D> gnu/lib/libssp/libssp_nonshared (obj,all,install)
building static ssp_nonshared library
/usr/local/powerpc64-freebsd/bin/ar -crD libssp_nonshared.a =
`NM=3D'/usr/local/powerpc64-freebsd/bin/nm' NMFLAGS=3D'' lorder =
ssp-local.o  | tsort -q`
/usr/local/powerpc64-freebsd/bin/ranlib -D libssp_nonshared.a
sh /usr/src/tools/install.sh  -C -o root -g wheel -m 444   =
libssp_nonshared.a /usr/obj/usr/src/tmp/usr/lib/
=3D=3D=3D> gnu/lib/libgcc (obj,all,install)
LC_ALL=3DC awk -f =
/usr/src/gnu/lib/libgcc/../../../contrib/gcc/opt-functions.awk  -f =
/usr/src/gnu/lib/libgcc/../../../contrib/gcc/opth-gen.awk  < optionlist =
> options.h
/usr/local/bin/powerpc64-portbld-freebsd11.0-gcc =
--sysroot=3D/usr/obj/usr/src/tmp -B/usr/local/powerpc64-freebsd/bin/ -c =
-O2 -pipe   -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  =
-DHAVE_GTHR_DEFAULT  =
-I/usr/src/gnu/lib/libgcc/../../../contrib/gcclibs/include  =
-I/usr/src/gnu/lib/libgcc/../../../contrib/gcc/config =
-I/usr/src/gnu/lib/libgcc/../../../contrib/gcc -I.  =
-I/usr/src/gnu/lib/libgcc/../../usr.bin/cc/cc_tools -std=3Dgnu99 =
-Wno-error=3Dunused-function -Wno-error=3Denum-compare =
-Wno-error=3Dlogical-not-parentheses -Wno-error=3Dbool-compare =
-Wno-error=3Duninitialized -Wno-error=3Darray-bounds =
-Wno-error=3Dclobbered -Wno-error=3Dcast-align -Wno-error=3Dextra =
-Wno-error=3Dattributes -Wno-error=3Dinline =
-Wno-error=3Dunused-but-set-variable -Wno-error=3Dunused-value =
-Wno-error=3Dstrict-aliasing -Wno-error=3Daddress     =
-fvisibility=3Dhidden -DHIDE_EXPORTS -fPIC -fexceptions -D__GLIBC__=3D3 =
-DElfW=3D__ElfN -o unwind-dw2.o =
/usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c
In file included from =
/usr/src/gnu/lib/libgcc/../../../contrib/gcc/tsystem.h:47:0,
                 from =
/usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:32:
=
/usr/local/lib/gcc/powerpc64-portbld-freebsd11.0/5.3.0/include/stddef.h:56=
:24: fatal error: sys/_types.h: No such file or directory
compilation terminated.
*** Error code 1

This is because r300886 filters out the -isystem options that point to
${WORLDTMP}/usr/include.  When I build using r300885, it errors out
while building the atf-c++ libraries:

=3D=3D=3D> lib/atf/libatf-c++ (all)
/usr/local/bin/powerpc64-portbld-freebsd11.0-g++ -isystem =
/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1 -std=3Dc++11  =
-nostdinc++ -L/usr/obj/powerpc.powerpc64/usr/src/tmp/../lib/libc++ =
-isystem /usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include =
-L/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/lib =
--sysroot=3D/usr/obj/powerpc.powerpc64/usr/src/tmp =
-B/usr/local/powerpc64-freebsd/bin/  -O2 -pipe -DHAVE_CONFIG_H =
-I/usr/src/contrib/atf -I/usr/src/lib/atf/libatf-c++/../libatf-c -I. =
-DHAVE_CONFIG_H -MD -MF.depend.application.o -MTapplication.o =
-fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k =
-W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized =
-Wno-error=3Dunused-function -Wno-error=3Denum-compare =
-Wno-error=3Dlogical-not-parentheses -Wno-error=3Dbool-compare =
-Wno-error=3Duninitialized -Wno-error=3Darray-bounds =
-Wno-error=3Dclobbered -Wno-error=3Dcast-align -Wno-error=3Dextra =
-Wno-error=3Dattributes -Wno-error=3Dinline =
-Wno-error=3Dunused-but-set-variable -Wno-error=3Dunused-value =
-Wno-error=3Dstrict-aliasing -Wno-error=3Daddress    -c =
/usr/src/contrib/atf/atf-c++/detail/application.cpp -o application.o
In file included from =
/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1/memory:616:0,
                 from =
/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1/algorithm:628,
                 from =
/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1/string:439,
                 from =
/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1/__locale:15,
                 from =
/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1/ios:216,
                 from =
/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1/ostream:138,
                 from =
/usr/src/contrib/atf/atf-c++/detail/application.hpp:29,
                 from =
/usr/src/contrib/atf/atf-c++/detail/application.cpp:26:
/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1/atomic:571:0: =
error: "_Atomic" redefined [-Werror]
 #define _Atomic(x) __gcc_atomic::__gcc_atomic_t<x>
 ^
In file included from /usr/src/sys/sys/endian.h:32:0,
                 from =
/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1/__config:96,
                 from =
/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/include/c++/v1/ostream:137,
                 from =
/usr/src/contrib/atf/atf-c++/detail/application.hpp:29,
                 from =
/usr/src/contrib/atf/atf-c++/detail/application.cpp:26:
/usr/src/sys/sys/cdefs.h:283:0: note: this is the location of the =
previous definition
 #define _Atomic(T)  struct { T volatile __val; }
 ^

It appears that there is a conflict between how sys/cdefs.h defines
_Atomic() and how the libc++ headers define it.  It looks like the
definition in the libc++ headers is more suitable for gcc, so maybe we
should disable our custom definition in sys/defs.h when an external gcc
is used?  Or at least, disable it when compiling for C++.

-Dimitry


--Apple-Mail=_FF5AB575-B720-48C8-976E-25288B17E822
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.30

iEYEARECAAYFAldJnfAACgkQsF6jCi4glqO3NACfZVSSBhZWl3P58A3RzC6OD9Ro
JuIAoJlvJBV9bBE14AktH7eD3XCvtz+2
=TaYs
-----END PGP SIGNATURE-----

--Apple-Mail=_FF5AB575-B720-48C8-976E-25288B17E822--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B291643F-B423-48FE-9A45-B25F1495C879>