aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2017-11-17 10:09:43 -0800
committerSteve Arnold <nerdboy@gentoo.org>2017-11-17 10:09:43 -0800
commitb996442506737be3826735cca0f65a9b9911ce0f (patch)
tree0e1bee6cebd4a9eac41585fdc1c3a214c71d3974 /configs/crossdev-examples.txt
parentupdate example configs and add some crossdev examples (diff)
downloadarm-b996442506737be3826735cca0f65a9b9911ce0f.tar.gz
arm-b996442506737be3826735cca0f65a9b9911ce0f.tar.bz2
arm-b996442506737be3826735cca0f65a9b9911ce0f.zip
configs: update crossdev examples
Signed-off-by: Steve Arnold <nerdboy@gentoo.org>
Diffstat (limited to 'configs/crossdev-examples.txt')
-rw-r--r--configs/crossdev-examples.txt74
1 files changed, 67 insertions, 7 deletions
diff --git a/configs/crossdev-examples.txt b/configs/crossdev-examples.txt
index 9a44c64..20fe41c 100644
--- a/configs/crossdev-examples.txt
+++ b/configs/crossdev-examples.txt
@@ -1,8 +1,16 @@
-This works with new USE=ada toolchain overlay and the crossdev-fixes
-branch, however, the current crossdev-99999999 wants to put the cross
-overlay in the wrong place. The --ov-output swicth does create the
-overlay but then fails to look there. Apparently using the (deprecated)
-PORTDIR_OVERLAY env var is the only way...
+This works with new USE=ada toolchain overlay from 5.4 up and the newer
+crossdev, however, crossdev-99999999 still wants to put the cross overlay
+in the wrong place. The --ov-output swicth does create the overlay but
+then crossdev fails to look there. Apparently using the (deprecated)
+PORTDIR_OVERLAY env var is the best way...
+
+Note these also work (up through cortex-M4, not tested with avr yet)
+with USE=ada for cross/embedded gnat. For non-glibc/bare-metal
+(currently armv7m with newlib) you should also add "--disable-libada"
+to EXTRA_ECONF.
+
+Note you may need to play with USE flags and set your system linker to
+bfd first if gold is default.
This worked for arm:
@@ -17,15 +25,67 @@ as of 10/06/2017 with:
glibc 2.25-r5
linux-headers 4.13
+To go back slightly to match previous headers, and add some USE flags:
+(remember to disable other overlays first)
+
+PORTDIR_OVERLAY="/usr/local/armv7-a /var/lib/layman/ada" \
+ USE="ada -graphite hardened -fortran -go -jit multitarget -openmp -vtv" \
+ EXTRA_ECONF="--with-arch=armv7-a --with-tune=cortex-a9 --with-float-abi=hard --with-fpu=vfpv3-d16" \
+ crossdev --g 5.4.0-r4 --b 2.28.1 --k 4.10 --l 2.24-r4 \
+ -t armv7a-hardfloat-linux-gnueabi --ex-gdb -v
+
+For gcc 4.9.4 try:
+
+PORTDIR_OVERLAY="/usr/local/armv7-a" \
+ USE="-graphite -hardened -fortran -go -jit multitarget -openmp -vtv" \
+ EXTRA_ECONF="--with-arch=armv7-a --with-tune=cortex-a9 --with-float-abi=hard --with-fpu=vfpv3-d16" \
+ crossdev --g 4.9.4-r1 --b 2.28.1 \
+ -t armv7a-hardfloat-linux-gnueabi --ex-gdb -v
+
This worked for arm64:
crossdev -v -t aarch64-unknown-linux-gnu --ex-gdb
This worked for cortex-M4:
-USE="hardened multitarget lzma -multilib -openmp -fortran -jit" \
+Change the tuning to match your cpu; you need s4 for c++ and ada
+(you may also want to relax the hardened flags).
+
+USE="hardened multitarget lzma multilib -openmp -fortran -jit" \
EXTRA_ECONF="--disable-multilib --disable-libsanitizer \
--with-arch=armv7e-m --with-tune=cortex-m4 --with-float-abi=hard \
--with-fpu=fpv4-sp-d16 --with-mode=thumb" \
- crossdev -t armv7m-hardfloat-eabi --ex-gdb \
+ crossdev -t armv7m-hardfloat-eabi -s4 --ex-gdb \
--show-fail-log --ov-output /usr/local/cortex-m4
+
+
+This works for avr:
+
+Note that, except for pie, hardened and sanitizer can be enabled,
+but should be disabled if anything doesn't look right. Also note
+that graphite appears to optimize the arduino sketch loops away,
+so you probably don't want that...
+
+And arduino/other newer builds seem to require c++ and even -flto (which
+also means it needs gold linker and plugins, maybe a manual step now...
+So binutils and gcc need USE=cxx along with stage4 to build the right stuff.
+
+Lastly note you should not need anything older than 4.9.4 and 2.29.1 for
+current arduino IDE use. If you switch to older binutils after installing
+current avr toolchain you'll need to make a manual symlink for ldscripts.
+
+PORTDIR_OVERLAY="/usr/local/portage/cross-avr" \
+ USE="cxx -graphite -hardened multitarget lzma multilib -sanitize -nls -openmp -pie -fortran -jit -vtv" \
+ EXTRA_ECONF="--enable-libstdcxx-time=no" \
+ crossdev --g 6.4.0 -t avr -s4 --ex-gdb --show-fail-log -v
+
+This works for avr and older gcc / binutils:
+Note gcc 4.8.4 is broken wrt avr-libc, at least it fails mmcu compat test
+for "standard" arduino cpus (notably uno and mega) so does not install the
+required crtm*.o files.
+
+PORTDIR_OVERLAY="/usr/local/portage/cross-avr" \
+ USE="cxx -graphite -hardened multitarget lzma multilib -nls -openmp nopie nossp -sanitize -fortran -jit -vtv" \
+ EXTRA_ECONF="--enable-libstdcxx-time=no" \
+ crossdev --g 4.9.4-r1 --b 2.25.1-r1 -t avr -s4 \
+ --ex-gdb --show-fail-log -v