[Bug target/46655] invalid '.line 0' directive emitted with -g
richard.nolde at cybox dot com
gcc-bugzilla@gcc.gnu.org
Tue May 17 05:44:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46655
--- Comment #29 from Richard Nolde <richard.nolde at cybox dot com> 2011-05-16 23:19:24 UTC ---
On 04/01/2011 06:24 AM, michael.haubenwallner at salomon dot at wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46655
>
> --- Comment #28 from Michael Haubenwallner<michael.haubenwallner at salomon dot at> 2011-04-01 12:24:32 UTC ---
> Looks like IBM "fixed" their Assembler to ignore invalid .line pseudo-ops
> again:
> https://www-304.ibm.com/support/docview.wss?uid=isg1IZ87535
I seem to be unable to use my Gcc Bugzilla account at the moment
(waiting for an updated password token message), so I'll send this one
to you in the hope that it adds to the known database of issues for Gcc
on AIX. I received the URL to update my Bugzilla password and it
accepted it but I still cannot login. "The username or password you
entered is not valid." comes up each time I try.
I'm now running AIX 6.1, oslevel -s returns 6100-06-03-1048 and the
problem seems to persist with newer versions of gcc as well. I installed
gcc 4.4.6 today after having issues trying to build GNU barcode from source.
gcc -v
Using built-in specs.
Target: powerpc-ibm-aix6.1.0.0
Configured with: ../gcc-4.4.6/configure --with-as=/usr/bin/as
--with-ld=/usr/bin/ld --enable-languages=c,c++,fortran
--prefix=/opt/freeware --enable-threads
--enable-version-specific-runtime-libs --disable-nls
--enable-decimal-float=dpd --host=powerpc-ibm-aix6.1.0.0
Thread model: aix
gcc version 4.4.6 (GCC)
The original Makefile includes -g among the CFLAGS, which produces the
now well documented error message from the AIX assembler as noted in
this thread. After revisiting the GCC Bugzilla site today, I added
initializations for all the Static variables in the source code files
that were not arrays and were not already initialized and then I tried
to recompile with -g in the CFLAGS. This attempt now fails with the also
reported message:
...
/usr/bin/gcc -g -std=gnu89 -O2 -Wall -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1 main.o cmdline.o -L. -lbarcode
-lpaper -lm -o barcode
ld: 0711-596 SEVERE ERROR: Object main.o
An RLD for section 2 (.data) refers to symbol 944,
but the storage class of the symbol is not C_EXT or C_HIDEXT.
collect2: ld returned 12 exit status
make: *** [barcode] Error 1
The only way to get a successful compile under AIX 6.1 TL 3 with IBM's
fix-du-jour is to remove -g from the CFLAGS.
Here is the top of the GNU barcode Makefile, the rest is standard
install targets etc.
#
# This Makefile should run fine with both pmake and gmake
#
CC = /usr/bin/gcc
CFLAGS = -std=gnu89 -O2 -Wall -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRCASECMP=1
RANLIB = /usr/bin/ranlib
INSTALL = /opt/freeware/bin/install -c
LDFLAGS = -L. -l$(TARGET) -lpaper -lm
prefix = /opt/freeware
BINDIR = $(bindir)
LIBDIR = $(libdir)
INCDIR = $(includedir)
MANDIR = $(prefix)/share
MAN1DIR = $(mandir)/man1
MAN3DIR = $(mandir)/man3
INFODIR = $(infodir)
# getopt may be installed or not, if not take our copy
GETOPT_O =
TARGET = barcode
LIBRARY = lib$(TARGET).a
MAN1 = $(TARGET).1
MAN3 = $(TARGET).3
#INFO = doc/$(TARGET).info
HEADER = $(TARGET).h
LIBOBJECTS = library.o ean.o code128.o code39.o code93.o i25.o \
msi.o plessey.o codabar.o \
ps.o pcl.o code11.o fonts.o
EXEOBJECTS = main.o cmdline.o $(GETOPT_O)
ALLSOURCES = $(LIBOBJECTS:.o=.c) $(EXEOBJECT:.o=.c)
#Hmm... "RM" is undefined in pmake
RM = rm
#all: $(TARGET) $(LIBRARY) $(MAN1) $(MAN3) $(INFO) sample
all: $(TARGET) $(LIBRARY) sample
$(TARGET): $(LIBRARY) $(EXEOBJECTS)
$(CC) $(CFLAGS) $(EXEOBJECTS) $(LDFLAGS) -o $(TARGET)
ALSO, FWIW, gdb 7.2.1 under AIX 6.1 coredumps when trying to print any
variable that is a pointer to char. I can compile programs that don't
have static variables with -g, but I get a coredump when I tried to
debug them. I can try to create a simple test case if this is not a
known bug.
Thanks,
Richard Nolde
More information about the Gcc-bugs
mailing list