On Sunday, February 15, 2015 03:09 AM, Renato Golin
wrote:> On 13 February 2015 at 00:06, Ben Pope <benpope81 at gmail.com>
wrote:
>> But it's a Cortex-A7, not A8, how do I convince the test-release.sh
or build
>> scripts to make Phase1 clang target Cortex A7 for Phase2? (with
vfpv4-d16)
>
> Cortex-A7 is actually newer (and has more features) than Cortex-A8
> (don't ask), so having A8 as the minimum is still ok.
OK, fair point, but I would like detection to get it right. I wonder if
I should update config.guess / config.sub? I never understood autotools.
> Also, I believe the Pi2 is VFPv4-D32, not VFPv4-D16, but that's
> irrelevant to your problem.
Hmm, not sure where I thought I saw it was -D16.
> Can you share the error message, too? APFloat is, indeed, the first
> file to be compiled, so as Richard said, the error is probably because
> the binaries you created on Phase2 are broken.
OK, so I'm now building RC3 using the Phase1 of RC2 (because clang is
significantly faster than gcc)
Phase1:
# Compiling llvm 3.6.0-rc3 Release
# make -j 4 VERBOSE=1
llvm[0]: Constructing LLVMBuild project information.
/usr/bin/python
/home/ben/development/llvm/3.6.0/rc3/llvm.src/utils/llvm-build/llvm-build \
--native-target "ARM" \
--enable-targets "X86 Sparc PowerPC ARM AArch64 Mips XCore MSP430
CppBackend NVPTX Hexagon SystemZ R600" \
--enable-optional-components "" \
--write-library-table
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/tools/llvm-config/LibraryDependencies.inc
\
--write-make-fragment
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/Makefile.llvmbuild
\
--write-cmake-fragment
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/LLVMBuild.cmake
\
--write-cmake-exports-fragment
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/cmake/modules/LLVMBuildExports.cmake
for dir in lib/Support lib/TableGen utils lib/IR lib tools/llvm-config
tools docs cmake unittests; do \
if ([ ! -f $dir/Makefile ] || \
command test $dir/Makefile -ot
/home/ben/development/llvm/3.6.0/rc3/llvm.src/$dir/Makefile ); then \
/home/ben/development/llvm/3.6.0/rc3/llvm.src/autoconf/mkinstalldirs $dir; \
/bin/cp /home/ben/development/llvm/3.6.0/rc3/llvm.src/$dir/Makefile
$dir/Makefile; \
fi; \
(make -C $dir all ) || exit 1; \
done
make[1]: Entering directory
'/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/lib/Support'
/home/ben/development/llvm/3.6.0/rc3/llvm.src/autoconf/mkinstalldirs
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release
> /dev/null
/home/ben/development/llvm/3.6.0/rc3/llvm.src/autoconf/mkinstalldirs
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/./
> /dev/null
echo 'Created.' >
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/.dir
echo 'Created.' >
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/.//.dir
/home/ben/development/llvm/3.6.0/rc3/llvm.src/autoconf/mkinstalldirs
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/Release/lib
> /dev/null
llvm[1]: Compiling APFloat.cpp for Release build
if /home/ben/development/llvm/3.6.0/clang-3.6-rc2/bin/clang++
-I/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/include
-I/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/lib/Support
-I/home/ben/development/llvm/3.6.0/rc3/llvm.src/include
-I/home/ben/development/llvm/3.6.0/rc3/llvm.src/lib/Support -DNDEBUG
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -std=c++11
-fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fPIC
-ffunction-sections -fdata-sections -Wcast-qual -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcovered-switch-default
-Wno-uninitialized -Wno-missing-field-initializers -Wno-comment -c -MMD
-MP -MF
"/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.d.tmp"
-MT
"/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.o"
-MT
"/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.d"
/home/ben/development/llvm/3.6.0/rc3/llvm.src/lib/Support/APFloat.cpp -o
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.o
; \
Phase2:
# Compiling llvm 3.6.0-rc3 Release
# make -j 4 VERBOSE=1
llvm[0]: Constructing LLVMBuild project information.
/usr/bin/python
/home/ben/development/llvm/3.6.0/rc3/llvm.src/utils/llvm-build/llvm-build \
--native-target "ARM" \
--enable-targets "X86 Sparc PowerPC ARM AArch64 Mips XCore MSP430
CppBackend NVPTX Hexagon SystemZ R600" \
--enable-optional-components "" \
--write-library-table
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/tools/llvm-config/LibraryDependencies.inc
\
--write-make-fragment
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/Makefile.llvmbuild
\
--write-cmake-fragment
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/LLVMBuild.cmake
\
--write-cmake-exports-fragment
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/cmake/modules/LLVMBuildExports.cmake
for dir in lib/Support lib/TableGen utils lib/IR lib tools/llvm-config
tools docs cmake unittests; do \
if ([ ! -f $dir/Makefile ] || \
command test $dir/Makefile -ot
/home/ben/development/llvm/3.6.0/rc3/llvm.src/$dir/Makefile ); then \
/home/ben/development/llvm/3.6.0/rc3/llvm.src/autoconf/mkinstalldirs $dir; \
/bin/cp /home/ben/development/llvm/3.6.0/rc3/llvm.src/$dir/Makefile
$dir/Makefile; \
fi; \
(make -C $dir all ) || exit 1; \
done
make[1]: Entering directory
'/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support'
/home/ben/development/llvm/3.6.0/rc3/llvm.src/autoconf/mkinstalldirs
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release
> /dev/null
/home/ben/development/llvm/3.6.0/rc3/llvm.src/autoconf/mkinstalldirs
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/./
> /dev/null
echo 'Created.' >
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/.dir
echo 'Created.' >
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/.//.dir
/home/ben/development/llvm/3.6.0/rc3/llvm.src/autoconf/mkinstalldirs
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/Release/lib
> /dev/null
llvm[1]: Compiling APFloat.cpp for Release build
if
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.install/bin/clang++
-I/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/include
-I/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support
-I/home/ben/development/llvm/3.6.0/rc3/llvm.src/include
-I/home/ben/development/llvm/3.6.0/rc3/llvm.src/lib/Support -DNDEBUG
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -std=c++11
-fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fPIC
-ffunction-sections -fdata-sections -Wcast-qual -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcovered-switch-default
-Wno-uninitialized -Wno-missing-field-initializers -Wno-comment -c -MMD
-MP -MF
"/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.d.tmp"
-MT
"/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.o"
-MT
"/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.d"
/home/ben/development/llvm/3.6.0/rc3/llvm.src/lib/Support/APFloat.cpp -o
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.o
; \
then /bin/mv -f
"/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.d.tmp"
"/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.d";
else /bin/rm
"/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.d.tmp";
exit 1; fi
Failure:
Stack dump:
0. Program arguments:
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.install/bin/clang
-cc1 -triple armv7-unknown-linux-gnueabihf -emit-obj -disable-free
-disable-llvm-verifier -main-file-name APFloat.cpp -mrelocation-model
pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -fuse-init-array -target-cpu cortex-a8 -target-abi
aapcs-linux -mfloat-abi hard -target-linker-version 2.24.90.20141023
-dwarf-column-info -ffunction-sections -fdata-sections -coverage-file
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.o
-resource-dir
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.install/bin/../lib/clang/3.6.0
-dependency-file
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.d.tmp
-MP -MT
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.o
-MT
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.d
-D NDEBUG -D _GNU_SOURCE -D __STDC_CONSTANT_MACROS -D
__STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -I
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/include
-I
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support
-I /home/ben/development/llvm/3.6.0/rc3/llvm.src/include -I
/home/ben/development/llvm/3.6.0/rc3/llvm.src/lib/Support
-internal-isystem
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/c++/4.9
-internal-isystem
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/arm-linux-gnueabihf/c++/4.9
-internal-isystem
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/arm-linux-gnueabihf/c++/4.9
-internal-isystem
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/c++/4.9/backward
-internal-isystem
/usr/local/include -internal-isystem
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.install/bin/../lib/clang/3.6.0/include
-internal-externc-isystem /usr/include/arm-linux-gnueabihf
-internal-externc-isystem /include -internal-externc-isystem
/usr/include -O3 -Wcast-qual -Wall -W -Wno-unused-parameter
-Wwrite-strings -Wcovered-switch-default -Wno-uninitialized
-Wno-missing-field-initializers -Wno-comment -std=c++11
-fdeprecated-macro -fdebug-compilation-dir
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support
-ferror-limit 19 -fmessage-length 0 -fvisibility-inlines-hidden
-mstackrealign -fno-rtti -fno-signed-char -fobjc-runtime=gcc
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o
/home/ben/development/llvm/3.6.0/rc3/Phase2/Release/llvmCore-3.6.0-rc3.obj/lib/Support/Release/APFloat.o
-x c++
/home/ben/development/llvm/3.6.0/rc3/llvm.src/lib/Support/APFloat.cpp
1.
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/c++/4.9/bits/ptr_traits.h:77:25:
at annotation token
2.
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/c++/4.9/bits/ptr_traits.h:37:1:
parsing namespace 'std'
3.
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/c++/4.9/bits/ptr_traits.h:73:5:
parsing struct/union/class body '__ptrtr_rebind_helper'
clang: error: unable to execute command: Bus error
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.6.0 (tags/RELEASE_360/rc3)
Target: armv7-unknown-linux-gnueabihf
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed
source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/ARMBuildAttrs-9db901.cpp
clang: note: diagnostic msg: /tmp/ARMBuildAttrs-9db901.sh
clang: note: diagnostic msg:
Files:
https://drive.google.com/file/d/0B0WRfgyTe4VeQ1NBcGhTNzBWbjg/view?usp=sharing
But I can do it with the built compiler and helloword.cpp:
ben at jessie-rpi:/tmp$
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.install/bin/clang
helloworld.cpp
Stack dump:
0. Program arguments:
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.install/bin/clang
-cc1 -triple armv7-unknown-linux-gnueabihf -emit-obj -mrelax-all
-disable-free -disable-llvm-verifier -main-file-name helloworld.cpp
-mrelocation-model static -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array
-target-cpu cortex-a8 -target-abi aapcs-linux -mfloat-abi hard
-target-linker-version 2.24.90.20141023 -dwarf-column-info -resource-dir
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.install/bin/../lib/clang/3.6.0
-internal-isystem
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/c++/4.9
-internal-isystem
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/arm-linux-gnueabihf/c++/4.9
-internal-isystem
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/arm-linux-gnueabihf/c++/4.9
-internal-isystem
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/c++/4.9/backward
-internal-isystem
/usr/local/include -internal-isystem
/home/ben/development/llvm/3.6.0/rc3/Phase1/Release/llvmCore-3.6.0-rc3.install/bin/../lib/clang/3.6.0/include
-internal-externc-isystem /usr/include/arm-linux-gnueabihf
-internal-externc-isystem /include -internal-externc-isystem
/usr/include -fdeprecated-macro -fdebug-compilation-dir /tmp
-ferror-limit 19 -fmessage-length 200 -mstackrealign -fno-signed-char
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -o /tmp/helloworld-88f241.o -x c++ helloworld.cpp
1.
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/c++/4.9/bits/basic_string.h:114:57:
current parser token 'other'
2.
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/c++/4.9/bits/basic_string.h:45:1:
parsing namespace 'std'
3.
/usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../../include/c++/4.9/bits/basic_string.h:112:5:
parsing struct/union/class body 'basic_string'
clang: error: unable to execute command: Bus error
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.6.0 (tags/RELEASE_360/rc3)
Target: armv7-unknown-linux-gnueabihf
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed
source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/helloworld-2f9a06.cpp
clang: note: diagnostic msg: /tmp/helloworld-2f9a06.sh
clang: note: diagnostic msg:
Files:
https://drive.google.com/file/d/0B0WRfgyTe4VeNXkwYkt5b1c1TFE/view?usp=sharing
So yeah, the built compiler is completely broken.
Ben