[patch #8806] AX_APPEND_COMPILE_FLAGS, AX_APPEND_LINK_FLAGS: Optional INPUT arg

anonymous <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <[email protected]>
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: [email protected]
             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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.