public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
@ 2007-11-29 12:01 ` bechir dot zalila at gmail dot com
  2007-11-29 12:02 ` bechir dot zalila at gmail dot com
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bechir dot zalila at gmail dot com @ 2007-11-29 12:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bechir dot zalila at gmail dot com  2007-11-29 12:01 -------
Created an attachment (id=14665)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14665&action=view)
Ada package spec


-- 


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


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

* [Bug ada/34289]  New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
@ 2007-11-29 12:01 bechir dot zalila at gmail dot com
  2007-11-29 12:01 ` [Bug ada/34289] " bechir dot zalila at gmail dot com
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: bechir dot zalila at gmail dot com @ 2007-11-29 12:01 UTC (permalink / raw)
  To: gcc-bugs

Hi,

When recompiling an Ada file (attachements p.ads p.adb) using "-s" option for
gnatmake. The object file is systemtically rebuild even if it is up-to-date and
if even the compiler flags have not changed.

* How to reproduce the bug:
===========================

INPUT FILES:
============

Attached p.ads and p.adb

COMMAND LINE:
=============

Two successive executions of:

gnatmake -s p.adb

EXPECTED BEHAVIOR:
==================

first: gnatmake -s p.adb

gcc -c p.adb

second: gnatmake -s p.adb

<nothing> (object file is up to date, thus it is not recompiled)

ACTUAL BEHAVIOR:
================

first: gnatmake -s p.adb

gcc -c p.adb

second: gnatmake -s p.adb

gcc -c p.adb

Object file is recompiled systematically at each execution

MINI DIAGNOSTIC:
================

If we use the -v flag of gnatmake, we get the following output:

GNATMAKE  4.3.0 20071119 (experimental)
Copyright (C) 1995-2007, Free Software Foundation, Inc.
  "p.ali" being checked ...
  -> "p.adb" different number of switches
-mmacosx-version-min=10.4

gcc -c p.adb
End of compilation

The command line option '-mmacosx-version-min=10.4' is added automatically 
by gcc when calling gnat1.

Passing -v to gcc (gcc -v -c p.adb) gives the following (truncated) output:

Using built-in specs.
Target: i686-apple-darwin8
Configured with: ../gcc_trunk/configure --disable-nls
--prefix=/Volumes/Stock/dev/gcc-4.3_trunk --host=i686-apple-darwin8
--target=i686-apple-darwin8 --build=i686-apple-darwin8 --enable-languages=c,ada
--with-gmp=/opt/local
Thread model: posix
gcc version 4.3.0 20071119 (experimental) (GCC)

...

.../gnat1 -quiet -dumpbase p.adb -mmacosx-version-min=10.4 -mtune=generic -fPIC
p.adb -o /var/tmp//ccqsMDI3.s

...

There are indeed several options added by gcc to gnat1 (especially
-mmacosx-version-min=10.4 and -mtune=generic). But for some reason, only
-mmacosx-version-min=10.4 causes the problem.

Here is my system configuration:

* the exact version of GCC, as shown by "gcc -v";

Using built-in specs.
Target: i686-apple-darwin8
Configured with: ../gcc_trunk/configure --disable-nls
--prefix=/Volumes/Stock/dev/gcc-4.3_trunk --host=i686-apple-darwin8
--target=i686-apple-darwin8 --build=i686-apple-darwin8 --enable-languages=c,ada
--with-gmp=/opt/local
Thread model: posix
gcc version 4.3.0 20071119 (experimental) (GCC)

* the system type (uname -a);

Darwin xxxxxxxxx.xxxx.xx 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10
18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386

* the options when GCC was configured/built;

../gcc_trunk/configure --disable-nls --prefix=/Volumes/Stock/dev/gcc-4.3_trunk
--host=i686-apple-darwin8 --target=i686-apple-darwin8
--build=i686-apple-darwin8 --enable-languages=c,ada --with-gmp=/opt/local


-- 
           Summary: Systematic recompilation of up-to-date object files when
                    using the "-s" gnatmake option GNAT 4.3.0 on x86-*-
                    Darwin8
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bechir dot zalila at gmail dot com
 GCC build triplet: i686-apple-darwin8
  GCC host triplet: i686-apple-darwin8
GCC target triplet: i686-apple-darwin8


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
  2007-11-29 12:01 ` [Bug ada/34289] " bechir dot zalila at gmail dot com
@ 2007-11-29 12:02 ` bechir dot zalila at gmail dot com
  2007-11-30  9:19 ` bechir dot zalila at gmail dot com
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bechir dot zalila at gmail dot com @ 2007-11-29 12:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bechir dot zalila at gmail dot com  2007-11-29 12:01 -------
Created an attachment (id=14666)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14666&action=view)
Ada package body


-- 


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
  2007-11-29 12:01 ` [Bug ada/34289] " bechir dot zalila at gmail dot com
  2007-11-29 12:02 ` bechir dot zalila at gmail dot com
@ 2007-11-30  9:19 ` bechir dot zalila at gmail dot com
  2007-11-30  9:30 ` bechir dot zalila at gmail dot com
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bechir dot zalila at gmail dot com @ 2007-11-30  9:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from bechir dot zalila at gmail dot com  2007-11-30 09:19 -------
In gcc/config/i386/darwin.h, we can see:

#define CC1_SPEC "%(cc1_cpu) \
  %{!mkernel:%{!static:%{!mdynamic-no-pic:-fPIC}}} \
  %{!mmacosx-version-min=*:-mmacosx-version-min=%(darwin_minversion)} \
  %{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols
}}"

which cintains the addition of -mmacosx-version-min=... if it is not given,

In gcc/ada/lang-spec.h we can see the following:

%{O*} %{W*} %{w} %{p} %{pg:-p} %{a} %{f*} %{d*} %{g*&m*} "
#if defined(TARGET_VXWORKS_RTP)
   "%{fRTS=rtp:-mrtp} "
#endif
#if CONFIG_DUAL_EXCEPTIONS
   "%{fRTS=sjlj:-fsjlj} "
#endif
   "%1 %{!S:%{o*:%w%*-gnatO}} \

The %1 (processing of CC1_SPEC) comes after the %{g*&m*} which should result in
adding the -mmacosx-version-min=... after all options that begins with -g* and
especially -gnatez, and it should not be added in the .ali file. For some
reason, the -mmacosx-version-min=... is added before all options that begins
with -g...

I replaced %{g*&m*} by %{g*} %{m*} in lang-specs.h and this solved the problem.
However, I don't know whether its is very important to conserve the order among
-g* and -m* switches when passing them to gnat1. The change 83658 did not say
why:

* lang-specs.h: Keep -g and -m switches in the same order, and as the
last switches.


-- 


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (2 preceding siblings ...)
  2007-11-30  9:19 ` bechir dot zalila at gmail dot com
@ 2007-11-30  9:30 ` bechir dot zalila at gmail dot com
  2007-11-30  9:37 ` sam at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bechir dot zalila at gmail dot com @ 2007-11-30  9:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from bechir dot zalila at gmail dot com  2007-11-30 09:30 -------
Created an attachment (id=14670)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14670&action=view)
Patchfile that solves the poblem

This patchfile is valid only if the order among -g* and -m* switches is not
important.


-- 


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (3 preceding siblings ...)
  2007-11-30  9:30 ` bechir dot zalila at gmail dot com
@ 2007-11-30  9:37 ` sam at gcc dot gnu dot org
  2007-12-02  9:18 ` sam at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: sam at gcc dot gnu dot org @ 2007-11-30  9:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from sam at gcc dot gnu dot org  2007-11-30 09:36 -------
I sent a mail to the author of this change to ask if and why it was necessary.
Note that it may have been perfectly valid in 2004 as this target was not
covered yet.


-- 


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (4 preceding siblings ...)
  2007-11-30  9:37 ` sam at gcc dot gnu dot org
@ 2007-12-02  9:18 ` sam at gcc dot gnu dot org
  2007-12-02  9:58 ` bechir dot zalila at gmail dot com
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: sam at gcc dot gnu dot org @ 2007-12-02  9:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from sam at gcc dot gnu dot org  2007-12-02 09:17 -------
Bechir, could you please add the output of "gnatmake -s p.adb -v -cargs -v"?


-- 


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (5 preceding siblings ...)
  2007-12-02  9:18 ` sam at gcc dot gnu dot org
@ 2007-12-02  9:58 ` bechir dot zalila at gmail dot com
  2007-12-02 10:01 ` bechir dot zalila at gmail dot com
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bechir dot zalila at gmail dot com @ 2007-12-02  9:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from bechir dot zalila at gmail dot com  2007-12-02 09:57 -------
(In reply to comment #6)
> Bechir, could you please add the output of "gnatmake -s p.adb -v -cargs -v"?
> 

Here it is:

% gnatmake -s p.adb -cargs -v
gcc -c -v p.adb
Using built-in specs.
Target: i686-apple-darwin8
Configured with: ../gcc_trunk_clean/configure --disable-nls
--prefix=/Volumes/Stock/dev/gcc-4.3_trunk --host=i686-apple-darwin8
--target=i686-apple-darwin8 --build=i686-apple-darwin8 --enable-languages=c,ada
--with-gmp=/opt/local
Thread model: posix
gcc version 4.3.0 20071130 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-c' '-v' '-gnatez'
'-mtune=generic'

/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../libexec/gcc/i686-apple-darwin8/4.3.0/gnat1
-quiet -dumpbase p.adb -mmacosx-version-min=10.4 -gnatez -mtune=generic -fPIC
p.adb -o /var/tmp//ccyfAlPK.s
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-c' '-v' '-gnatez'
'-mtune=generic'
 as -arch i386 -force_cpusubtype_ALL -o p.o /var/tmp//ccyfAlPK.s
COMPILER_PATH=/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../libexec/gcc/i686-apple-darwin8/4.3.0/:/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../libexec/gcc/:/usr/libexec/gcc/i686-apple-darwin8/:/usr/lib/gcc/i686-apple-darwin8/
LIBRARY_PATH=/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../lib/gcc/i686-apple-darwin8/4.3.0/:/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../lib/gcc/:/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../lib/gcc/i686-apple-darwin8/4.3.0/../../../:/usr/lib/
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-c' '-v' '-gnatez'
'-mtune=generic'
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-c' '-v' '-gnatez'
'-mtune=generic'


-- 


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (6 preceding siblings ...)
  2007-12-02  9:58 ` bechir dot zalila at gmail dot com
@ 2007-12-02 10:01 ` bechir dot zalila at gmail dot com
  2007-12-02 10:23 ` sam at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bechir dot zalila at gmail dot com @ 2007-12-02 10:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from bechir dot zalila at gmail dot com  2007-12-02 10:00 -------
(In reply to comment #7)
> (In reply to comment #6)
> > Bechir, could you please add the output of "gnatmake -s p.adb -v -cargs -v"?
> > 
> 
> Here it is:

Sorry, forgot the first -v

% gnatmake -s p.adb -v -cargs -v

GNATMAKE  4.3.0 20071130 (experimental)
Copyright (C) 1995-2007, Free Software Foundation, Inc.
  "p.ali" being checked ...
  -> "p.adb" different number of switches
-mmacosx-version-min=10.4

gcc -c -v p.adb
Using built-in specs.
Target: i686-apple-darwin8
Configured with: ../gcc_trunk_clean/configure --disable-nls
--prefix=/Volumes/Stock/dev/gcc-4.3_trunk --host=i686-apple-darwin8
--target=i686-apple-darwin8 --build=i686-apple-darwin8 --enable-languages=c,ada
--with-gmp=/opt/local
Thread model: posix
gcc version 4.3.0 20071130 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-c' '-v' '-gnatez'
'-mtune=generic'

/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../libexec/gcc/i686-apple-darwin8/4.3.0/gnat1
-quiet -dumpbase p.adb -mmacosx-version-min=10.4 -gnatez -mtune=generic -fPIC
p.adb -o /var/tmp//ccu2zkMZ.s
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-c' '-v' '-gnatez'
'-mtune=generic'
 as -arch i386 -force_cpusubtype_ALL -o p.o /var/tmp//ccu2zkMZ.s
COMPILER_PATH=/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../libexec/gcc/i686-apple-darwin8/4.3.0/:/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../libexec/gcc/:/usr/libexec/gcc/i686-apple-darwin8/:/usr/lib/gcc/i686-apple-darwin8/
LIBRARY_PATH=/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../lib/gcc/i686-apple-darwin8/4.3.0/:/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../lib/gcc/:/Volumes/Stock/Dev/gcc-4.3_trunk/bin/../lib/gcc/i686-apple-darwin8/4.3.0/../../../:/usr/lib/
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-c' '-v' '-gnatez'
'-mtune=generic'
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-c' '-v' '-gnatez'
'-mtune=generic'
End of compilation


-- 


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (7 preceding siblings ...)
  2007-12-02 10:01 ` bechir dot zalila at gmail dot com
@ 2007-12-02 10:23 ` sam at gcc dot gnu dot org
  2007-12-03 13:54 ` bechir dot zalila at gmail dot com
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: sam at gcc dot gnu dot org @ 2007-12-02 10:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from sam at gcc dot gnu dot org  2007-12-02 10:23 -------
Ok, the problem here is that "-mmacosx-version-min=10.4" should appear *after*
"-gnatez" not to be remembered in the ALI file:

COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-c' '-v' '-gnatez'
'-mtune=generic'


-- 


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (8 preceding siblings ...)
  2007-12-02 10:23 ` sam at gcc dot gnu dot org
@ 2007-12-03 13:54 ` bechir dot zalila at gmail dot com
  2007-12-03 14:00 ` bechir dot zalila at gmail dot com
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bechir dot zalila at gmail dot com @ 2007-12-03 13:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from bechir dot zalila at gmail dot com  2007-12-03 13:54 -------
Created an attachment (id=14689)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14689&action=view)
Patchfile that solves the problem

This patchfile solves the problem by adding a new switch (-gnatea) analog to 
-gnatez . -gnatea and -gnatez surround the switches we want to store in the ALI
file.


-- 

bechir dot zalila at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #14670|0                           |1
        is obsolete|                            |


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (9 preceding siblings ...)
  2007-12-03 13:54 ` bechir dot zalila at gmail dot com
@ 2007-12-03 14:00 ` bechir dot zalila at gmail dot com
  2007-12-03 14:23 ` bechir dot zalila at gmail dot com
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bechir dot zalila at gmail dot com @ 2007-12-03 14:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from bechir dot zalila at gmail dot com  2007-12-03 14:00 -------
After a lot of investigation, I succeeded to isolate the problem. The added
-mmacosx-min-version is not done when processing the CC1_SPEC: It is done in
the main function in gcc.c using the GCC_DRIVER_HOST_INITIALIZATION macro.

In gcc.c (function main):

#ifdef GCC_DRIVER_HOST_INITIALIZATION
  /* Perform host dependent initialization when needed.  */
  GCC_DRIVER_HOST_INITIALIZATION;
#endif

For the darwin (ppc + x86): in config/darwin.g:

extern void darwin_default_min_version (int * argc, char *** argv);
#define GCC_DRIVER_HOST_INITIALIZATION \
  darwin_default_min_version (&argc, &argv)
#endif /* CROSS_DIRECTORY_STRUCTURE */

And finally the darwin_default_min_version function defined in
config/darwin-driver.c. This function inserts -mmacosx-version-min
*at the beginning* of argv, just after the command name (argv[1])

I Attached a patchfile (gcc_ada.diff) for the GNAT frontend that solves the
problem


-- 


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (10 preceding siblings ...)
  2007-12-03 14:00 ` bechir dot zalila at gmail dot com
@ 2007-12-03 14:23 ` bechir dot zalila at gmail dot com
  2007-12-03 15:26 ` bechir dot zalila at gmail dot com
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bechir dot zalila at gmail dot com @ 2007-12-03 14:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from bechir dot zalila at gmail dot com  2007-12-03 14:23 -------
Created an attachment (id=14690)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14690&action=view)
Patchfile that solves the problem

Fixed a typo in comment


-- 

bechir dot zalila at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #14689|0                           |1
        is obsolete|                            |


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (11 preceding siblings ...)
  2007-12-03 14:23 ` bechir dot zalila at gmail dot com
@ 2007-12-03 15:26 ` bechir dot zalila at gmail dot com
  2008-02-22 18:28 ` ebotcazou at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: bechir dot zalila at gmail dot com @ 2007-12-03 15:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from bechir dot zalila at gmail dot com  2007-12-03 15:26 -------
Created an attachment (id=14693)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14693&action=view)
Patchfile that solves the problem

Added the support of registring non-(g*&m*) switches


-- 

bechir dot zalila at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #14690|0                           |1
        is obsolete|                            |


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (12 preceding siblings ...)
  2007-12-03 15:26 ` bechir dot zalila at gmail dot com
@ 2008-02-22 18:28 ` ebotcazou at gcc dot gnu dot org
  2008-02-22 18:28 ` ebotcazou at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-02-22 18:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from ebotcazou at gcc dot gnu dot org  2008-02-22 18:28 -------
Taking care of it.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-02-22 18:27:40         |2008-02-22 18:28:00
               date|                            |


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


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

* [Bug ada/34289] Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (13 preceding siblings ...)
  2008-02-22 18:28 ` ebotcazou at gcc dot gnu dot org
@ 2008-02-22 18:28 ` ebotcazou at gcc dot gnu dot org
  2008-02-23 14:29 ` [Bug ada/34289] gnatmake -s doesn't work ebotcazou at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-02-22 18:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from ebotcazou at gcc dot gnu dot org  2008-02-22 18:27 -------
Thanks for the report, analysis and patch.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-02-22 18:27:40
               date|                            |


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


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

* [Bug ada/34289] gnatmake -s doesn't work
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (14 preceding siblings ...)
  2008-02-22 18:28 ` ebotcazou at gcc dot gnu dot org
@ 2008-02-23 14:29 ` ebotcazou at gcc dot gnu dot org
  2008-11-07 10:49 ` ebotcazou at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-02-23 14:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from ebotcazou at gcc dot gnu dot org  2008-02-23 14:28 -------
http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00198.html


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|ebotcazou at gcc dot gnu dot|unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug ada/34289] gnatmake -s doesn't work
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (15 preceding siblings ...)
  2008-02-23 14:29 ` [Bug ada/34289] gnatmake -s doesn't work ebotcazou at gcc dot gnu dot org
@ 2008-11-07 10:49 ` ebotcazou at gcc dot gnu dot org
  2008-11-07 10:50 ` ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-11-07 10:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from ebotcazou at gcc dot gnu dot org  2008-11-07 10:47 -------
Subject: Bug 34289

Author: ebotcazou
Date: Fri Nov  7 10:46:18 2008
New Revision: 141673

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141673
Log:
        PR ada/34289
        * lib.ads: (Enable_Switch_Storing): Declare.
        * lib.adb: (Enable_Switch_Storing): New procedure.
        * switch-c.adb (Scan_Front_End_Switches): Add support for -gnatea.
        * make.adb: (Compile_Sources.Compile): Add -gnatea as first option.
        (Display): Never display -gnatea
        * gcc-interface/lang-specs.h: If -gnatea is present, pass -gnatez.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/gcc-interface/lang-specs.h
    trunk/gcc/ada/lib.adb
    trunk/gcc/ada/lib.ads
    trunk/gcc/ada/make.adb
    trunk/gcc/ada/switch-c.adb


-- 


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


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

* [Bug ada/34289] gnatmake -s doesn't work
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (16 preceding siblings ...)
  2008-11-07 10:49 ` ebotcazou at gcc dot gnu dot org
@ 2008-11-07 10:50 ` ebotcazou at gcc dot gnu dot org
  2008-11-15 16:18 ` ebotcazou at gcc dot gnu dot org
  2008-11-15 16:20 ` ebotcazou at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-11-07 10:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from ebotcazou at gcc dot gnu dot org  2008-11-07 10:49 -------
Sorry for the delay.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2008-
                   |                            |11/msg00283.html
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.0


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


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

* [Bug ada/34289] gnatmake -s doesn't work
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (17 preceding siblings ...)
  2008-11-07 10:50 ` ebotcazou at gcc dot gnu dot org
@ 2008-11-15 16:18 ` ebotcazou at gcc dot gnu dot org
  2008-11-15 16:20 ` ebotcazou at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-11-15 16:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from ebotcazou at gcc dot gnu dot org  2008-11-15 16:16 -------
Subject: Bug 34289

Author: ebotcazou
Date: Sat Nov 15 16:15:00 2008
New Revision: 141888

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141888
Log:
        PR ada/34289
        * lib.ads: (Enable_Switch_Storing): Declare.
        * lib.adb: (Enable_Switch_Storing): New procedure.
        * switch-c.adb (Scan_Front_End_Switches): Add support for -gnatea.
        * make.adb: (Compile_Sources.Compile): Add -gnatea as first option.
        (Display): Never display -gnatea
        * lang-specs.h: If -gnatea is present, pass -gnatez.

Modified:
    branches/gcc-4_3-branch/gcc/ada/ChangeLog
    branches/gcc-4_3-branch/gcc/ada/lang-specs.h
    branches/gcc-4_3-branch/gcc/ada/lib.adb
    branches/gcc-4_3-branch/gcc/ada/lib.ads
    branches/gcc-4_3-branch/gcc/ada/make.adb
    branches/gcc-4_3-branch/gcc/ada/switch-c.adb


-- 


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


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

* [Bug ada/34289] gnatmake -s doesn't work
  2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
                   ` (18 preceding siblings ...)
  2008-11-15 16:18 ` ebotcazou at gcc dot gnu dot org
@ 2008-11-15 16:20 ` ebotcazou at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-11-15 16:20 UTC (permalink / raw)
  To: gcc-bugs



-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.4.0                       |4.3.3


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


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

end of thread, other threads:[~2008-11-15 16:20 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-29 12:01 [Bug ada/34289] New: Systematic recompilation of up-to-date object files when using the "-s" gnatmake option GNAT 4.3.0 on x86-*-Darwin8 bechir dot zalila at gmail dot com
2007-11-29 12:01 ` [Bug ada/34289] " bechir dot zalila at gmail dot com
2007-11-29 12:02 ` bechir dot zalila at gmail dot com
2007-11-30  9:19 ` bechir dot zalila at gmail dot com
2007-11-30  9:30 ` bechir dot zalila at gmail dot com
2007-11-30  9:37 ` sam at gcc dot gnu dot org
2007-12-02  9:18 ` sam at gcc dot gnu dot org
2007-12-02  9:58 ` bechir dot zalila at gmail dot com
2007-12-02 10:01 ` bechir dot zalila at gmail dot com
2007-12-02 10:23 ` sam at gcc dot gnu dot org
2007-12-03 13:54 ` bechir dot zalila at gmail dot com
2007-12-03 14:00 ` bechir dot zalila at gmail dot com
2007-12-03 14:23 ` bechir dot zalila at gmail dot com
2007-12-03 15:26 ` bechir dot zalila at gmail dot com
2008-02-22 18:28 ` ebotcazou at gcc dot gnu dot org
2008-02-22 18:28 ` ebotcazou at gcc dot gnu dot org
2008-02-23 14:29 ` [Bug ada/34289] gnatmake -s doesn't work ebotcazou at gcc dot gnu dot org
2008-11-07 10:49 ` ebotcazou at gcc dot gnu dot org
2008-11-07 10:50 ` ebotcazou at gcc dot gnu dot org
2008-11-15 16:18 ` ebotcazou at gcc dot gnu dot org
2008-11-15 16:20 ` ebotcazou at gcc dot gnu dot org

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).