diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-20 21:14:02 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-23 16:20:11 +0100 |
| commit | eb99a300a52f29fc8c12f550d801272092e2f77c (patch) | |
| tree | 12096b44036f226f657ac4b6ccf75ced2f115faa /meta | |
| parent | f2985f0588ea1b8aa54e902e7c6433d37ab2a964 (diff) | |
| download | poky-eb99a300a52f29fc8c12f550d801272092e2f77c.tar.gz | |
gcc-package-sdk.inc: Allow executable extension to be overridden
On platforms like windows, executables have extensions. Whilst I'm not proposing
we wholesale support windows extensions, this small tweak allows a cross compiler
targetting mingw to be built which does seem like a good use case.
The patch therefore adds an EXEEXT which the mingw layer can set for the libexec
symlinks.
(From OE-Core rev: 8dcf0d95b654fa6cc56193168aaa744052ad8ffc)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-package-sdk.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-package-sdk.inc b/meta/recipes-devtools/gcc/gcc-package-sdk.inc index b546d5c8f8..21beccc4d7 100644 --- a/meta/recipes-devtools/gcc/gcc-package-sdk.inc +++ b/meta/recipes-devtools/gcc/gcc-package-sdk.inc | |||
| @@ -28,6 +28,8 @@ FILES_${PN}-doc = "\ | |||
| 28 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \ | 28 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \ |
| 29 | " | 29 | " |
| 30 | 30 | ||
| 31 | EXEEXT = "" | ||
| 32 | |||
| 31 | # Compute how to get from libexecdir to bindir in python (easier than shell) | 33 | # Compute how to get from libexecdir to bindir in python (easier than shell) |
| 32 | BINRELPATH = "${@oe.path.relative(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${bindir}"))}" | 34 | BINRELPATH = "${@oe.path.relative(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${bindir}"))}" |
| 33 | 35 | ||
| @@ -62,12 +64,13 @@ do_install () { | |||
| 62 | # found. | 64 | # found. |
| 63 | dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ | 65 | dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ |
| 64 | install -d $dest | 66 | install -d $dest |
| 67 | suffix=${EXEEXT} | ||
| 65 | for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do | 68 | for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do |
| 66 | if [ "$t" = "g77" -o "$t" = "gfortran" ] && [ ! -e ${D}${bindir}/${TARGET_PREFIX}$t ]; then | 69 | if [ "$t" = "g77" -o "$t" = "gfortran" ] && [ ! -e ${D}${bindir}/${TARGET_PREFIX}$t$suffix ]; then |
| 67 | continue | 70 | continue |
| 68 | fi | 71 | fi |
| 69 | 72 | ||
| 70 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t | 73 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t$suffix $dest$t$suffix |
| 71 | done | 74 | done |
| 72 | 75 | ||
| 73 | chown -R root:root ${D} | 76 | chown -R root:root ${D} |
