This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Include sysdep.h before stdio.h in ldlex.c


Hi Richard,

The attached patch is a bit ugly, but it does fix the problem.
Better suggestions welcome!

Isn't this a generic problem for any AIX compiled program that uses flex and large files ? If so, I wonder if someone has developed a less clunk workaround ?


Tested on powerpc-ibm-aix5.3.0 and x86_64-linux-gnu.  OK to apply
to trunk and branch?

I think that you ought to add a comment to ldlex-wrapper.c explaining why it is needed. Otherwise someone might be tempted to come along and delete it.


Ralf also pointed out that:

This will create ldlex-wrapper.o, not ldlex.o, for compilers other than
GCC.  I'm not sure whether this code still needs to be portable to
compilers that don't understand '-c -o', but if it does, then possible
ways out are either: add AM_PROG_CC_C_O to configure.in, or rename the
input file so that the object matches the source file with s/\.c$/.o/.
If not (i.e., it is fine to assume that '-c -o' works), then adding -o
$@ right after -c should work.  (The ordering helps depcomp.)

My feeling is that adding AM_PROG_CC_C_O would be the best option. Assuming of course that the AIX native compiler supports -c -o. What do you think ?


Cheers
  Nick


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