Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/paparazzi/paparazzi-portabi…
Browse files Browse the repository at this point in the history
…lity-support
  • Loading branch information
rbdavison committed Feb 10, 2011
2 parents 8e29343 + 61468d3 commit ddbe4af
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
18 changes: 10 additions & 8 deletions darwin/macports/ports/cross/arm-none-eabi-gcc-linaro/Portfile
Expand Up @@ -47,9 +47,9 @@ post-extract {
system "ln -s ${workpath}/newlib-${newlibversion}/newlib ${workpath}/gcc-linaro-${version}/"
}

#patch.dir ${workpath}/gcc-linaro-${version}
#patchfiles \
# patch-gcc-config-arm-t-arm-elf.diff
patch.dir ${workpath}/gcc-linaro-${version}
patchfiles \
patch-gcc-config-arm-t-arm-elf.diff

# Since we don't build gcc and binutils at the same time, gcc's Makefile will try to transform
# program names as gcc's name (add -${version} with ${version} being the version of gcc).
Expand Down Expand Up @@ -82,11 +82,7 @@ configure.args --target=${targetarch} \
--enable-multilib \
--enable-languages="c" \
--with-newlib \
--with-cpu=cortex-m3 \
--with-tune=cortex-m3 \
--with-mode=thumb \
--with-float=soft \
--with-gnu-as \
--with-gnu-as \
--with-gnu-ld \
--disable-nls \
--disable-shared \
Expand All @@ -103,6 +99,12 @@ configure.args --target=${targetarch} \
--with-mpc=${prefix} \
--with-libiconv-prefix=${prefix} \
--disable-newlib-supplied-syscalls

if {${os.platform} == "darwin" && ($build_arch == "x86_64" || $build_arch == "ppc64")} {
configure.args-append --build=${build_arch}-apple-darwin${os.version} \
--host=${build_arch}-apple-darwin${os.version}
}

configure.cc_archflags
configure.cxx_archflags
configure.objc_archflags
Expand Down
Expand Up @@ -11,16 +11,16 @@
+# ./ (default)
+# thumb/ -mthumb
+# thumb2/ -mthumb -march=armv7
+# armv6-m/ -mthumb -march=armv6-m
+# armv4t/ -mthumb -march=armv4t
+
+MULTILIB_OPTIONS = mthumb
+MULTILIB_DIRNAMES = thumb
+MULTILIB_EXCEPTIONS =
MULTILIB_MATCHES =
+MULTILIB_ALIASES =
+MULTILIB_EXTRA_OPTS += msoft-float
+
+MULTILIB_OPTIONS += march=armv7/march=armv6-m
+MULTILIB_DIRNAMES += v7 v6-m
+MULTILIB_OPTIONS += march=armv7/march=armv4t
+MULTILIB_DIRNAMES += v7 v4t
+MULTILIB_EXCEPTIONS += march=armv7*
+MULTILIB_MATCHES += march?armv7=march?armv7-a
+MULTILIB_MATCHES += march?armv7=march?armv7-r
Expand All @@ -34,9 +34,9 @@
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-m4
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3
+
+MULTILIB_EXCEPTIONS += march=armv6-m
+MULTILIB_MATCHES += march?armv6-m=mcpu?cortex-m1
+MULTILIB_MATCHES += march?armv6-m=mcpu?cortex-m0
+MULTILIB_EXCEPTIONS += march=armv4t
+MULTILIB_MATCHES += march?armv4t=mcpu?arm7tdmi-s
+#MULTILIB_MATCHES +=
+
+# FIXME: We need a sane way of doing this.
+# This isn't really a multilib, it's a hack to add an extra option
Expand All @@ -46,15 +46,15 @@
+
+MULTILIB_EXCEPTIONS += mfix-cortex-m3-ldrd
+MULTILIB_EXCEPTIONS += mthumb/mfix-cortex-m3-ldrd
+MULTILIB_EXCEPTIONS += *march=armv6-m*mfix-cortex-m3-ldrd
+MULTILIB_EXCEPTIONS += *march=armv4t*mfix-cortex-m3-ldrd
+
+MULTILIB_ALIASES += mthumb/march?armv7/mfix-cortex-m3-ldrd=mthumb/march?armv7
+
+# As of at least 4.2, gcc passes the wrong -L options if some multilibs are
+# omitted from MULTILIB_OSDIRNAMES
+MULTILIB_OSDIRNAMES = mthumb=!thumb
+MULTILIB_OSDIRNAMES += mthumb/march.armv7/mfix-cortex-m3-ldrd=!thumb2
+MULTILIB_OSDIRNAMES += mthumb/march.armv6-m=!armv6-m
+MULTILIB_OSDIRNAMES += mthumb/march.armv4t=!armv4t
+

#MULTILIB_OPTIONS += march=armv7
Expand Down

0 comments on commit ddbe4af

Please sign in to comment.