add support for building for the roborio with clang
Change-Id: I1513da14b46f7d1cbe1444c60c810f352ee494ca
diff --git a/aos/build/aos.gypi b/aos/build/aos.gypi
index 5b95d3d..06e7ec2 100644
--- a/aos/build/aos.gypi
+++ b/aos/build/aos.gypi
@@ -56,9 +56,9 @@
],
'ldflags': [
'<@(platflags)',
- '-L', '/usr/lib/x86_64-linux-gnu/gcc/arm-frc-linux-gnueabi/4.9.1',
- #'-L', '<(arm-clang-sysroot)/other_lib/',
- #'-nostartfiles',
+ '-L/usr/lib/x86_64-linux-gnu/gcc/arm-frc-linux-gnueabi/4.9.1',
+ '-L<(arm-clang-symlinks)/more_libs',
+ '-B/usr/lib/x86_64-linux-gnu/gcc/arm-frc-linux-gnueabi/4.9.1',
],
},
},
diff --git a/aos/build/arm-clang-symlinks/README b/aos/build/arm-clang-symlinks/README
index e47d821..75210a5 100644
--- a/aos/build/arm-clang-symlinks/README
+++ b/aos/build/arm-clang-symlinks/README
@@ -1,6 +1,11 @@
This directory has symlinks to various other files to help clang figure out how
-to cross compile for arm with Debian's toolchain setup.
+to cross compile for arm with FIRST's toolchain setup.
-sysroot/ has symlinks to dpkg-cross and multilib directories so it can be used
- as a sysroot when compiling.
+sysroot/ has symlinks to various places so it can be used as a sysroot when
+ compiling.
bin/ has symlinks to the various tools so clang can find the native toolchain.
+more_libs/ has modified files of several psuedo-shared-objects which are
+ actually linker scripts as distributed with the FIRST toolchain. For some
+ reason, I can't get the linker to follow the documented behavior of
+ prefixing the absolute paths contained in them with the sysroot, so we have
+ copies which don't have any paths.
diff --git a/aos/build/arm-clang-symlinks/more_libs/libc.so b/aos/build/arm-clang-symlinks/more_libs/libc.so
index 188a467..714bcfe 100644
--- a/aos/build/arm-clang-symlinks/more_libs/libc.so
+++ b/aos/build/arm-clang-symlinks/more_libs/libc.so
@@ -2,4 +2,4 @@
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
-GROUP ( /home/brian/Desktop/git_frc971/2014/trunk/src/aos/build/arm-clang-symlinks/sysroot/lib/libc.so.6 /home/brian/Desktop/git_frc971/2014/trunk/src/aos/build/arm-clang-symlinks/sysroot/usr/lib/libc_nonshared.a AS_NEEDED ( /home/brian/Desktop/git_frc971/2014/trunk/src/aos/build/arm-clang-symlinks/sysroot/lib/ld-linux.so.3 ) )
+GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.3 ) )
diff --git a/aos/build/arm-clang-symlinks/more_libs/libpthread.so b/aos/build/arm-clang-symlinks/more_libs/libpthread.so
index a7c99bf..71f034f 100644
--- a/aos/build/arm-clang-symlinks/more_libs/libpthread.so
+++ b/aos/build/arm-clang-symlinks/more_libs/libpthread.so
@@ -2,4 +2,4 @@
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
-GROUP ( /home/brian/Desktop/git_frc971/2014/trunk/src/aos/build/arm-clang-symlinks/sysroot/lib/libpthread.so.0 /home/brian/Desktop/git_frc971/2014/trunk/src/aos/build/arm-clang-symlinks/sysroot/usr/lib/libpthread_nonshared.a )
+GROUP ( libpthread.so.0 libpthread_nonshared.a )
diff --git a/aos/build/arm-clang-symlinks/other_lib b/aos/build/arm-clang-symlinks/other_lib
deleted file mode 120000
index 4603144..0000000
--- a/aos/build/arm-clang-symlinks/other_lib
+++ /dev/null
@@ -1 +0,0 @@
-/usr/lib/x86_64-linux-gnu/gcc/arm-frc-linux-gnueabi/4.9.1
\ No newline at end of file
diff --git a/aos/build/build.py b/aos/build/build.py
index 90028ba..21e0379 100755
--- a/aos/build/build.py
+++ b/aos/build/build.py
@@ -512,7 +512,7 @@
return r
ARCHITECTURES = ('arm', 'amd64')
- COMPILERS = ('clang', 'gcc_frc')
+ COMPILERS = ('clang', 'gcc_frc', 'clang_frc')
SANITIZERS = ('address', 'undefined', 'integer', 'memory', 'thread', 'none')
SANITIZER_TEST_WARNINGS = {
'memory': (True,