This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Dependencies & Solaris Make
- From: Andrew Pickin <PickinA at logica dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: 17 Jul 2002 15:38:45 +0100
- Subject: Dependencies & Solaris Make
Can somebody confirm that gcc 3 and SUNPRO_DEPENDENCIES
dependencies with Solaris make are behaving differently than
version 2.9.5? And is this intended behaviour?
If we consider the make file dependency
.c.o:
@cp $(@:.o=.c) /tmp/tmp.c
gcc -c /tmp/tmp.c -o $@
@rm /tmp/tmp.c
[ Don't ask why I'm doing this, I'm not, but it demonstrates the point ]
Version 2.9.5 produced dependency
main.o: ...
<system headers>
.....
cp main.c /tmp/tmp.c
gcc -g -O2 -c /tmp/tmp.c -o main.o
rm /tmp/tmp.c
Whereas 3.0.4 produces:
main.o: /tmp/tmp.c
...
<system headers>
.....
cp main.c /tmp/tmp.c
gcc -c /tmp/tmp.c -o main.o
rm /tmp/tmp.c
Whereas 3.1.0 produces:
main.o: /tmp/tmp.c
cp main.c /tmp/tmp.c
gcc -g -O2 -c /tmp/tmp.c -o main.o
rm /tmp/tmp.c
I have raised the problem with the System Headers previously
but GCC 3 has introduced a new dependency of object file on the source.
This means that in the best case everything will be compiles twice the
first time around, as Sun's make re-reads the dependency list again and
identifies a new dependency. In the worst case builds fail as temporary
files may nolonger be present.
It this intended behaviour?
AMP
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.