From: ludo@gnu.org (Ludovic Courtès)
To: 11251@debbugs.gnu.org
Subject: bug#11251: Use -Wl,-rpath instead of -R on GNU/Linux with GCC 4.6
Date: Mon, 16 Apr 2012 12:01:06 +0200 [thread overview]
Message-ID: <87obqsq9lp.fsf@gnu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 86 bytes --]
Hello,
The patch below fixes linking of ‘temacs’ on GNU/Linux with GCC 4.6.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 577 bytes --]
=== modified file 'configure.in'
--- configure.in 2011-09-26 18:38:31 +0000
+++ configure.in 2012-04-16 09:52:23 +0000
@@ -3406,7 +3406,7 @@ case "$opsys" in
## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
## had different values in configure (in ac_link) and src/Makefile.in.
## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
- gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;;
+ gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX_RPATH)" ;;
*) LD_SWITCH_SYSTEM_TEMACS= ;;
esac
[-- Attachment #3: Type: text/plain, Size: 803 bytes --]
GCC 4.5 used to ignore ‘-R’, but GCC 4.6 rejects it:
--8<---------------cut here---------------start------------->8---
$ echo "int main () { return 0; }" > t.c
$ ./result/bin/gcc t.c -R/foo
gcc: unrecognized option '-R/foo'
$ echo $?
0
$ ./result/bin/gcc --version | head -1
gcc (GCC) 4.5.3
$ gcc t.c -R/foo
gcc: error: unrecognized option ‘-R’
$ echo $?
1
$ gcc --version | head -1
gcc (GCC) 4.6.2
--8<---------------cut here---------------end--------------->8---
(This is why the ‘build’ job at <http://hydra.nixos.org/eval/605870> has
been failing since the standard build environment switched from GCC 4.5
to 4.6 last month.)
In fact, the above should be applied to all GNU variants, so *gnu* may
be more appropriate than gnu-linux.
Thanks,
Ludo’.
next reply other threads:[~2012-04-16 10:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 10:01 Ludovic Courtès [this message]
2012-04-16 10:49 ` bug#11251: Use -Wl, -rpath instead of -R on GNU/Linux with GCC 4.6 Chong Yidong
2012-04-16 16:31 ` Glenn Morris
2012-04-18 2:14 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87obqsq9lp.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=11251@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.