public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/50342] New: gcc/configure fails on Mac OS X Lion/Xcode 4.1 if building Ada
@ 2011-09-09 13:51 simon at pushface dot org
  2011-09-09 14:39 ` [Bug bootstrap/50342] " howarth at nitro dot med.uc.edu
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: simon at pushface dot org @ 2011-09-09 13:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50342

             Bug #: 50342
           Summary: gcc/configure fails on Mac OS X Lion/Xcode 4.1 if
                    building Ada
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: simon@pushface.org


Created attachment 25234
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25234
May help to demonstrate failure mode

When building with --enable-languages=c,ada you have to use an Ada-capable
compiler, so you can't use Apple's. I used GCC 4.6.0.

This fails in gcc/configure; eg, from config.log,

    configure:5860: checking size of long long
    configure:5865: gcc -o conftest -g -fkeep-inline-functions conftest.c  >&5
    Undefined symbols for architecture x86_64:
      "___builtin___stpncpy_chk", referenced from:
          ___inline_stpncpy_chk in ccgrb5E9.o
    ld: symbol(s) not found for architecture x86_64

because Apple's gcc (4.2.1) has the builtin and GCC 4.6.0 doesn't.

I found that if I remove the -fkeep-inline-functions the configure succeeds
(make check-ada, check-fortran, check-c++ were OK, I chopped check-c because it
was swapping unacceptably).

I expect that if I could figure a way of passing -D_FORTIFY_SOURCE=0 to the gcc
call at configure:5865 (presumably to other gcc calls as well; I know the
'checking size of' ones all fail but not so immediately fatally, you just get
size of long = 0).

<string.h> says

#if defined (__GNUC__) && _FORTIFY_SOURCE > 0 && !defined (__cplusplus)
/* Security checking functions.  */
#include <secure/_string.h>
#endif

<_types.h> says

#ifndef _FORTIFY_SOURCE
#  if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) &&
((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1050)
#    define _FORTIFY_SOURCE 0
#  else
#    define _FORTIFY_SOURCE 2    /* on by default */
#  endif
#endif

The attached code fails as above if compiled with FSF GCC and
-fkeep-inline-functions unless you say -D_FORTIFY_SOURCE=0 .


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-12-21 23:12 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-09 13:51 [Bug bootstrap/50342] New: gcc/configure fails on Mac OS X Lion/Xcode 4.1 if building Ada simon at pushface dot org
2011-09-09 14:39 ` [Bug bootstrap/50342] " howarth at nitro dot med.uc.edu
2011-09-09 15:21 ` [Bug bootstrap/50342] gcc/configure fails on Mac OS X Lion/Xcode 4.1 with recent GCCs ebotcazou at gcc dot gnu.org
2011-09-09 16:31 ` howarth at nitro dot med.uc.edu
2011-09-09 18:38 ` ebotcazou at gcc dot gnu.org
2011-09-09 18:50 ` simon at pushface dot org
2011-09-09 18:56 ` simon at pushface dot org
2011-09-09 19:07 ` ebotcazou at gcc dot gnu.org
2011-09-09 20:51 ` simon at pushface dot org
2012-05-07 23:09 ` simon at pushface dot org
2012-05-08  2:14 ` mrs at gcc dot gnu.org
2012-05-08 20:48 ` simon at pushface dot org
2013-01-14 19:36 ` fago at earthlink dot net
2013-01-14 21:59 ` howarth at nitro dot med.uc.edu
2013-01-31 20:35 ` simon at pushface dot org
2013-01-31 21:00 ` howarth at nitro dot med.uc.edu
2013-12-21 23:12 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).