all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Colascione <dan.colascione@gmail.com>
To: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: [PATCH] OS X: make configure work better out of the box with FSF GCC
Date: Mon, 28 Feb 2011 13:04:43 -0800	[thread overview]
Message-ID: <AANLkTikF4xRx5snrzrwW8wxN5G=qheHSgQ3ETG32kReS@mail.gmail.com> (raw)
In-Reply-To: <ausjv89blg.fsf@fencepost.gnu.org>

On Mon, Feb 28, 2011 at 11:56 AM, Glenn Morris <rgm@gnu.org> wrote:
>
> Daniel Colascione wrote:
>
>> I didn't include the corresponding configure changes; I figure I can let
>> whoever installs this patch regenerate the script.
>
> Could you explain what problem this change is supposed to fix?

Various header files (right now, Carbon --- which, granted, isn't used
in the in-tree Emacs) presume that Apple-gcc specific features like
printf attributes for CFStrings work.  With FSF gcc (i.e., gcc without
Apple-specific patches) these declarations break the build.  Defining
__INTEL_COMPILER essentially tells the system to use only the set of
gcc extensions supported by icc, which is a subset of the extensions
supported by FSF GCC.

>
>> +    case "$(which "${CC-cc}")" in
>> +      /usr/bin/* | /usr/lib/* )
>> +        CPP="${CC-cc} -E -no-cpp-precomp"
>> +        ;;
>> +      * )
>> +        # The below macro prevents the Carbon headers from defining
>> +        # nonstandard constructs not understood by FSF GCC.
>> +        CPPFLAGS="$CPPFLAGS -D__INTEL_COMPILER=1"
>> +        CPP="${CC-cc} -E -D__INTEL_COMPILER=1"
>
> "FSF GCC" seems tautological at best.
>
> It seems fragile to test the location of the compiler. Why not test for
> the actual compiler version?
>

Apple essentially forked gcc 4.2, and it still reports that version.
I don't know a good way to distinguish Apple-patched gcc 4.2 from
FSF-issue gcc 4.2, and seeing whether the compiler is installed in the
"system compiler" location seems like a robust-enough way to figure
this out.  Another option would be to just do a test compilation, but
that takes time.



  reply	other threads:[~2011-02-28 21:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-27  5:05 [PATCH] OS X: make configure work better out of the box with FSF GCC Daniel Colascione
2011-02-28 19:56 ` Glenn Morris
2011-02-28 21:04   ` Daniel Colascione [this message]
2011-02-28 21:12     ` Andreas Schwab
2011-02-28 22:15     ` Chad Brown

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='AANLkTikF4xRx5snrzrwW8wxN5G=qheHSgQ3ETG32kReS@mail.gmail.com' \
    --to=dan.colascione@gmail.com \
    --cc=emacs-devel@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.