This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[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
- From: "bechir dot zalila at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2007 12:00:49 -0000
- Subject: [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
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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