Skip to content

Commit 8f0a31b

Browse files
author
Filippo Cremonese
committed
Fix windres not finding gcc
1 parent 2f62817 commit 8f0a31b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.orchestra/config/components/toolchain/lib/binutils.lib.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
#@ toolchain_name=mandatory,
1010
#@ triple=mandatory,
1111
#@ binutils_version=mandatory,
12+
#@ gcc_version=mandatory,
1213
#@ extra_binutils_configure_options="",
1314
#@ binutils_sysroot=None,
1415
#@ ):
1516
#@ source_url = "https://ftp.gnu.org/gnu/binutils/binutils-" + binutils_version + ".tar.bz2"
1617
#@ binutils_sysroot = binutils_sysroot or "$ORCHESTRA_ROOT/" + triple
18+
#@ bindir = "${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/" + triple + "/binutils-bin/" + binutils_version
1719
license: COPYING
1820
configure: |
1921
extract.sh --into "$SOURCE_DIR" (@= source_url @)
@@ -27,7 +29,7 @@ configure: |
2729
--datadir=$ORCHESTRA_ROOT/share/binutils-data/(@= triple @)/(@= binutils_version @) \
2830
--infodir=$ORCHESTRA_ROOT/share/binutils-data/(@= triple @)/(@= binutils_version @)/info \
2931
--mandir=$ORCHESTRA_ROOT/share/binutils-data/(@= triple @)/(@= binutils_version @)/man \
30-
--bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/(@= triple @)/binutils-bin/(@= binutils_version @) \
32+
--bindir=(@= bindir @) \
3133
--libdir=$ORCHESTRA_ROOT/lib64/binutils/(@= triple @)/(@= binutils_version @) \
3234
--libexecdir=$ORCHESTRA_ROOT/lib64/binutils/(@= triple @)/(@= binutils_version @) \
3335
--includedir=$ORCHESTRA_ROOT/lib64/binutils/(@= triple @)/(@= binutils_version @)/include \
@@ -51,9 +53,14 @@ configure: |
5153
(@= expand_args(extra_binutils_configure_options) @) \
5254
CFLAGS="-w -ggdb3 -O3" \
5355
CXXFLAGS="-w -ggdb3 -O3"
56+
post_install: |
57+
(@- if "win" in toolchain_name: @)
58+
# Symlink needed for making windres use the right gcc
59+
ln -s "../../gcc-bin/(@= gcc_version @)/(@= triple @)-gcc" "${TMP_ROOT}(@= bindir @)/(@= triple @)-gcc"
60+
(@ end -@)
5461
build_system: make
5562
add_to_path:
56-
- ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/(@= triple @)/binutils-bin/(@= binutils_version @)
63+
- #@ bindir
5764
build_dependencies:
5865
- glibc
5966
- toolchain/host/gcc

.orchestra/config/components/toolchain/lib/toolchain.lib.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#@ ):
3939

4040
#@ if/end binutils_version:
41-
(@= "toolchain/" + toolchain_name + "/binutils" @): #@ create_binutils_component(toolchain_name=toolchain_name, triple=triple, binutils_version=binutils_version, extra_binutils_configure_options=extra_binutils_configure_options, binutils_sysroot=binutils_sysroot)
41+
(@= "toolchain/" + toolchain_name + "/binutils" @): #@ create_binutils_component(toolchain_name=toolchain_name, triple=triple, binutils_version=binutils_version, extra_binutils_configure_options=extra_binutils_configure_options, binutils_sysroot=binutils_sysroot, gcc_version=gcc_version)
4242

4343
#@ if/end gdb_version:
4444
(@= "toolchain/" + toolchain_name + "/gdb" @): #@ create_gdb_component(triple=triple, gdb_version=gdb_version)

0 commit comments

Comments
 (0)