| Summary: | sys-devel/gcc-4.2.4-r2 - gcc/toplev.c:539:1: error: redefinition of 'floor_log2' | ||
|---|---|---|---|
| Product: | Gentoo/Alt | Reporter: | Martin Mokrejš <mmokrejs> |
| Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
| Status: | RESOLVED OBSOLETE | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
build.log.bz2
gcc-build-logs.tar.bz2 |
||
|
Description
Martin Mokrejš
2016-07-11 16:22:30 UTC
Created attachment 440368 [details]
gcc-build-logs.tar.bz2
this looks similar to what we had on Darwin with Clang, where the compiler defaults to C99 mode. Does adding -std=gnu89 to CFLAGS help in this case? Hmm, but the build process ignores my C*FLAGS, probably because this is in the very early steps.
>>> Configuring source in /scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4 ...
* strip-flags: CFLAGS: changed '-std=gnu89' to ''
* strip-flags: CXXFLAGS: changed '-std=gnu89 -std=gnu89' to ''
* CFLAGS=""
* CXXFLAGS=""
* LDFLAGS="-Wl,-O1"
* PREFIX: /scratch/mmokrejs/gentoo/usr
* BINPATH: /scratch/mmokrejs/gentoo/usr/x86_64-pc-linux-gnu/gcc-bin/4.2.4
* LIBPATH: /scratch/mmokrejs/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4
* DATAPATH: /scratch/mmokrejs/gentoo/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.4
* STDCXX_INCDIR: /scratch/mmokrejs/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/include/g++-v4
* Languages: c,c++,fortran
* Configuring GCC with:
* --host=x86_64-pc-linux-gnu
* --build=x86_64-pc-linux-gnu
* --prefix=/scratch/mmokrejs/gentoo/usr
* --bindir=/scratch/mmokrejs/gentoo/usr/x86_64-pc-linux-gnu/gcc-bin/4.2.4
* --includedir=/scratch/mmokrejs/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/include
* --datadir=/scratch/mmokrejs/gentoo/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.4
* --mandir=/scratch/mmokrejs/gentoo/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.4/man
* --infodir=/scratch/mmokrejs/gentoo/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.4/info
* --with-gxx-include-dir=/scratch/mmokrejs/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/include/g++-v4
* --enable-languages=c,c++,fortran
* --enable-obsolete
* --enable-secureplt
* --disable-werror
* --with-system-zlib
* --enable-nls
* --without-included-gettext
* --enable-checking=release
* --enable-shared
* --enable-threads=posix
* --with-local-prefix=/scratch/mmokrejs/gentoo/usr
* --enable-__cxa_atexit
* --enable-clocale=gnu
* --disable-multilib
* --disable-altivec
* --disable-libgcj
* --enable-libgomp
* --disable-libmudflap
* --disable-libssp
/scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/scratch/mmokrejs/gentoo/usr --bindir=/scratch/mmokrejs/gentoo/usr/x86_64-pc-linux-gnu/gcc-bin/4.2.4 --includedir=/scratch/mmokrejs/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/include --datadir=/scratch/mmokrejs/gentoo/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.4 --mandir=/scratch/mmokrejs/gentoo/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.4/man --infodir=/scratch/mmokrejs/gentoo/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.4/info --with-gxx-include-dir=/scratch/mmokrejs/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/include/g++-v4 --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --enable-shared --enable-threads=posix --with-local-prefix=/scratch/mmokrejs/gentoo/usr --enable-__cxa_atexit --enable-clocale=gnu --disable-multilib --disable-altivec --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp
...
gcc -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H -I. -I. -I/scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc -I/
scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc/. -I/scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc/../include -I/scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc/../libcpp/include -I/scratch/mmokrejs/gentoo/var/tmp/
portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc/../libdecnumber -I../libdecnumber \
-DTARGET_NAME=\"x86_64-pc-linux-gnu\" \
-c /scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc/toplev.c -o toplev.o
try CC="gcc -std=gnu89" But principially it does fix the issue: cd /scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/build/gcc gcc -std=gnu89 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H -I. -I. -I/scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc -I/scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc/. -I/scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc/../include -I/scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc/../libcpp/include -I/scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc/../libdecnumber -I../libdecnumber -DTARGET_NAME=\"x86_64-pc-linux-gnu\" -c /scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-4.2.4-r2/work/gcc-4.2.4/gcc/toplev.c -o toplev.o $ ls -latr toplev.o -rw-rw-r-- 1 mmokrejs mmokrejs 62104 Jul 12 10:18 toplev.o $ $ gcc -v Using built-in specs. COLLECT_GCC=/scratch/mmokrejs/gentoo/usr/x86_64-pc-linux-gnu/gcc-bin/5.3.0/gcc COLLECT_LTO_WRAPPER=/scratch/mmokrejs/gentoo/usr/libexec/gcc/x86_64-pc-linux-gnu/5.3.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /scratch/mmokrejs/gentoo/var/tmp/portage/sys-devel/gcc-5.3.0/work/gcc-5.3.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/scratch/mmokrejs/gentoo/usr --bindir=/scratch/mmokrejs/gentoo/usr/x86_64-pc-linux-gnu/gcc-bin/5.3.0 --includedir=/scratch/mmokrejs/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include --datadir=/scratch/mmokrejs/gentoo/usr/share/gcc-data/x86_64-pc-linux-gnu/5.3.0 --mandir=/scratch/mmokrejs/gentoo/usr/share/gcc-data/x86_64-pc-linux-gnu/5.3.0/man --infodir=/scratch/mmokrejs/gentoo/usr/share/gcc-data/x86_64-pc-linux-gnu/5.3.0/info --with-gxx-include-dir=/scratch/mmokrejs/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5 --with-python-dir=/scratch/mmokrejs/gentoo/share/gcc-data/x86_64-pc-linux-gnu/5.3.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 5.3.0 p1.0, pie-0.6.5' --enable-libstdcxx-time --enable-shared --enable-threads=posix --with-local-prefix=/scratch/mmokrejs/gentoo/usr --enable-__cxa_atexit --enable-clocale=gnu --disable-multilib --with-multilib-list=m64 --disable-altivec --disable-fixed-point --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --enable-lto --without-cloog --enable-libsanitizer Thread model: posix gcc version 5.3.0 (Gentoo 5.3.0 p1.0, pie-0.6.5) $ (In reply to Fabian Groffen from comment #4) > try CC="gcc -std=gnu89" And wow, this indeed worked around the strip-flags. Yes, I managed to emerge gcc-4.2.4-r2 by this approach. Thank you. this version is long gone |