This is the mail archive of the gcc-bugs@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]

gcc-2.91.66 HP-UX 10.x "-g" compilation question



Hi,

I am using gcc 2.91.66 on HP-UX 10.x platform, and am
experiencing problems while trying to build a debuggable
version of the executable (for use with GDB).

I have included the test program, compilation command and
log, and gcc installation directory contents below.

Could you please suggest what I am doing wrong ? (most
probably something terribly bone-headed)

Thanks,
Vamsi

---------------
test.cc:
---------------

int main()
{
    return (0);
}

---------------
command:
---------------

> g++-2.9.5 -g trial.cc
cc1plus: warning: -g is only supported when using GAS on this processor,
cc1plus: warning: -g option disabled.
(Compiles fine, but executable does not have debug info)
 
---------------
Output of "g++-2.9.5 -v -g trial.cc"
---------------

Reading specs from /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
 /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D__hppa__ -D__hp9000s800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__ -D__hpux__ -D__unix__ -D__hppa -D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix -Asystem(unix) -Asystem(hpux) -Acpu(hppa) -Amachine(hppa) -D__EXCEPTIONS -g -D__hp9000s700 -D_PA_RISC1_1 -D_HPUX_SOURCE -D_HIUX_SOURCE trial.cc /var/tmp/ccgUPkpb.ii
GNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) (hppa)
#include "..." search starts here:
#include <...> search starts here:
 /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/include/g++
 /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/hppa1.1-hp-hpux10.20/include
 /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66/include
 /usr/include
End of search list.
 /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66/cc1plus /var/tmp/ccgUPkpb.ii -quiet -dumpbase trial.cc -g -version -o /var/tmp/ccO0Ljrm.s
cc1plus: warning: -g is only supported when using GAS on this processor,
cc1plus: warning: -g option disabled.
GNU C++ version egcs-2.91.66 19990314 (egcs-1.1.2 release) (hppa1.1-hp-hpux10.20) compiled by GNU C version 2.8.1.
 /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66/as -o /var/tmp/ccSLinhJ.o /var/tmp/ccO0Ljrm.s
 /remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66/collect2 -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main /usr/ccs/lib/crt0.o -L/remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66 -L/remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/hppa1.1-hp-hpux10.20/lib -L/usr/ccs/bin -L/usr/ccs/lib -L/remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib /var/tmp/ccSLinhJ.o -lstdc++ -lm -lgcc -lc -lgcc

According to my understanding, the "as" program that I have specified
(by virtue of making a symlink from the directory where cc1plus etc
exist) is being picked up. However, the cc1plus program assumes
initially that "gas" is not available, and immediately ignores
the "-g" option.

---------------
Contents of gcc installation dir
---------------

> ls -la remote/drg100/depot_hpux10/gcc-2.9.5/hpux10/egcs-1.1.2_install/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66

drwxrwxr-x   4 phantom    cba_cad       4096 Mar 13 15:41 .
drwxrwxr-x   3 phantom    cba_cad       4096 Feb  9 22:07 ..
-rwxrwxr-x   1 phantom    cba_cad      88205 Feb  9 22:07 SYSCALLS.c.X
-rw-rw----   1 phantom    synopsys         0 Mar 13 15:41 a.out
lrwxrwxrwx   1 phantom    synopsys         8 Mar 13 15:40 as -> as-2.9.1
lrwxrwxrwx   1 phantom    synopsys        34 Mar 13 15:41 as-2.5.2 -> /remote/drg100/local/sys/hpux10/as
lrwxrwxrwx   1 vamsi      synopsys        28 Feb 15 11:45 as-2.9.1 -> /depot/binutils-2.9.1/bin/as
-rwxrwxr-x   1 phantom    cba_cad    4063758 Feb  9 22:07 cc1
-rwxrwxr-x   1 phantom    cba_cad    4223742 Feb  9 22:07 cc1obj
-rwxrwxr-x   1 phantom    cba_cad    5130180 Feb  9 22:07 cc1plus
-rwxrwxr-x   1 phantom    cba_cad     168212 Feb  9 22:07 collect2
-rwxrwxr-x   1 phantom    cba_cad     278825 Feb  9 22:07 cpp
-rwxrwxr-x   1 phantom    cba_cad    5392959 Feb  9 22:07 f771
lrwxrwxrwx   1 vamsi      synopsys         2 Feb 15 11:45 gas -> as
drwxrwxr-x  16 phantom    cba_cad       4096 Mar 13 05:29 include
-rwxrwxr-x   1 phantom    cba_cad     506552 Feb  9 22:10 libg2c.a
-rwxrwxr-x   1 phantom    cba_cad     148896 Feb  9 22:08 libgcc.a
-rwxrwxr-x   1 phantom    cba_cad     190540 Feb  9 22:08 libobjc.a
-rwxrwxr-x   1 phantom    cba_cad       1011 Feb  9 22:07 specs
drwxrwxr-x   2 phantom    cba_cad       4096 Feb  9 22:08 threads

---------------


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