Skip to content

Commit 9034fa8

Browse files
committed
git-branchless: enable PIC emitting on mips64el-like architectures
https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Code-Gen-Options.html#index-fPIC
1 parent e1302a9 commit 9034fa8

File tree

1 file changed

+14
-0
lines changed
  • app-utils/git-branchless/autobuild

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# FIXME: not sure why is this required
2+
# The linker tells me so...
3+
# error: linking with `clang` failed: exit status: 1
4+
# |
5+
# = note: ld.lld: error: relocation R_MIPS_64 cannot be used against symbol 'DW.ref.rust_eh_personality'; recompile with -fPIC
6+
# >>> defined in /usr/lib64/rustlib/mips64el-unknown-linux-gnuabi64/lib/libstd-6dcaeb4e3195ef4c.rlib(std-6dcaeb4e3195ef4c.std.fc0db18c60d19c82-cgu.0.rcgu.o)
7+
# >>> referenced by std.fc0db18c60d19c82-cgu.0
8+
# >>> std-6dcaeb4e3195ef4c.std.fc0db18c60d19c82-cgu.0.rcgu.o:(.eh_frame+0x37B3) in archive /usr/lib64/rustlib/mips64el-unknown-linux-gnuabi64/lib/libstd-6dcaeb4e3195ef4c.rlib
9+
abinfo "Tweaking CFLAGS and CXXFLAGS..."
10+
if ab_match_arch loongson3 || \
11+
ab_match_arch mips64r6el; then
12+
export CFLAGS="${CFLAGS} -fPIC"
13+
export CXXFLAGS="${CXXFLAGS} -fPIC"
14+
fi

0 commit comments

Comments
 (0)