ruby: fix gcc7 build for i686*
With gcc-7.1.0 -fstack-protector or -fstack-protector-strong fail to link because of undefined references to __stack_chk_fail_local. This patch is merely a hack to make ruby build until the root cause for this bug is found.
This commit is contained in:
parent
a761d8e268
commit
315fa72042
|
@ -28,6 +28,16 @@ pre_build() {
|
|||
sed -e 's,\(checking_for("wide getaddrinfo") {try_\)run,\1link,' -i ext/socket/extconf.rb
|
||||
# Hack for cross-builds.
|
||||
touch ext/ripper/check
|
||||
if [ "$XBPS_GCC_VERSION_MAJOR" -ge 7 ]; then
|
||||
# Set -fno-stack-protector for i686* or otherwise linking fails with
|
||||
# ...: undefined reference to `__stack_chk_fail_local'
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
i686*) sed -i Makefile \
|
||||
-e "s;-fstack-protector-strong;;" \
|
||||
-e "s;-fstack-protector;-fno-stack-protector;"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
post_install() {
|
||||
# Remove references to the cross compiler
|
||||
|
|
Loading…
Reference in New Issue