This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

different flags for different files


Hi,

I do not know whether I have discovered a bug in gcc, or whether I have
just not read the documentation thoroughly enough.

We had this horrible bug in our software package which in the end was
traced down to the following.  Our Makefile used to have `CFLAGS= -O',
and then we changed it to `CFLAGS = -g -O6 -mcpu=pentiumpro
-malign-double".  Hence, some of the files were compiled with the first
set of flags, and some with the second.  This led to a core dump very
early on in the executable.

This occurred on a "Linux dizzy.colorado.edu 2.2.12-20 #1 SMP Fri Jan 28
10:32:49 MST 2000 i686 unknown" using "egcs-2.91.66", and I can
reproduce it with gcc-2.95.3.  All sources were in C.

I realize that this mail is not up to snuff for a bug report, but it
will be a lot of work boiling the problem down to the bare essentials,
and I suspect that either this is a known bug, or an easy to understand
bug, or a misunderstanding on my behalf regarding how gcc can be used.

If it is the latter, let me point out that it would be more
user-friendly if files compiled with different flags could be linked
together, or if gcc would refuse to link files that have been compiled
with different flags.


Thanks for your help, and thanks a ton for gcc.

Roderick.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]