autoconf-archive-maintainers | |
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #8806] AX_APPEND_COMPILE_FLAGS, AX_APPEND_LINK_FLAGS: Optional IN
From: |
anonymous |
Subject: |
[patch #8806] AX_APPEND_COMPILE_FLAGS, AX_APPEND_LINK_FLAGS: Optional INPUT arg |
Date: |
Sun, 22 Nov 2015 08:59:16 +0000 |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 |
URL:
<http://savannah.gnu.org/patch/?8806>
Summary: AX_APPEND_COMPILE_FLAGS, AX_APPEND_LINK_FLAGS:
Optional INPUT arg
Project: GNU Autoconf Archive
Submitted by: None
Submitted on: So 22 Nov 2015 08:59:14 UTC
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
I'd like to add -fstack-protector-strong. The obvious solution is
AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])
Unfortunately, some ports of the GNU toolchain reportedly pass this
test, then fail to link. That's because the compiler accepts the
flag, duly emits references to helper code in libc (on my system:
___stack_chk_guard()), but libc doesn't provide, and linking fails.
A test covering this failure mode needs to compile and link code that
makes the compiler emit the canary. Here's mine:
int
main(int argc, char *argv[])
{
char arr[64], *dst = arr, *src = argv[0];
while ((*dst++ = *src++)) ;
}
Unfortunately, AX_APPEND_LINK_FLAGS doesn't let me supply input
source.
The actual work is done by AX_CHECK_LINK_FLAG, which has an optional
INPUT argument. I propose to add that to AX_APPEND_LINK_FLAGS, too.
For consistency, add it to AX_APPEND_COMPILE_FLAGS as well.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: So 22 Nov 2015 08:59:15 UTC Name:
0001-AX_APPEND_COMPILE_FLAGS-AX_APPEND_LINK_FLAGS-Optiona.patch Size: 3kB
By: None
Proposed patch
<http://savannah.gnu.org/patch/download.php?file_id=35519>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?8806>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/
- [patch #8806] AX_APPEND_COMPILE_FLAGS, AX_APPEND_LINK_FLAGS: Optional INPUT arg,
anonymous <=