On Wed, 6 Apr 2005, Eric Botcazou wrote:
Here's what I get with -H:
Sorry? -H applied to what command?
The GCC command line you pasted.
Oh ... "list included files"... sh-2.05$ chmod u+x !$ chmod u+x tmp-gcc-cmd.bash bash-2.05$ ./!$ ./tmp-gcc-cmd.bash + /export/home/Scratch/hgs/gcc-build/gcc/xgcc -H -B/export/home/Scratch/hgs/gcc-build/gcc/ -B/usr/local/sparc-sun-solaris2.9/bin/ -B/usr/local/sparc-sun-solaris2.9/lib/ -isystem /usr/local/sparc-sun-solaris2.9/include -isystem /usr/local/sparc-sun-solaris2.9/sys-include -DGC_SOLARIS_THREADS=1 -DGC_SOLARIS_PTHREADS=1 -DSILENT=1 -DNO_SIGNALS=1 -DALL_INTERIOR_POINTERS=1 -DJAVA_FINALIZATION=1 -DGC_GCJ_SUPPORT=1 -DATOMIC_UNCOLLECTABLE=1 -I. -I/export/home/Scratch/hgs/gcc-3.4.3/boehm-gc -I/export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/include -O2 -mcpu=v9 -fexceptions -I././targ-include -I/export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/./libc/include -O2 -mcpu=v9 -c /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c -fPIC -DPIC -o .libs/dyn_load.o . /export/home/Scratch/hgs/gcc-build/gcc/include/sys/types.h .. /usr/include/sys/isa_defs.h .. /usr/include/sys/feature_tests.h .. /usr/include/sys/machtypes.h .. /usr/include/sys/int_types.h .. /usr/include/sys/select.h ... /usr/include/sys/time.h .... /export/home/Scratch/hgs/gcc-build/gcc/include/sys/types.h .... /usr/include/time.h ..... /usr/include/iso/time_iso.h ..... /usr/include/sys/time_impl.h .... /usr/include/sys/select.h . /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/include/private/gc_priv.h .. /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/include/private/../gc.h ... /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/include/private/../gc_config_macros.h .... /export/home/Scratch/hgs/gcc-build/gcc/include/stddef.h ... /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/include/private/../gc_pthread_redirects.h .... /usr/include/thread.h ..... /export/home/Scratch/hgs/gcc-build/gcc/include/sys/signal.h ...... /usr/include/sys/iso/signal_iso.h ....... /usr/include/sys/unistd.h ...... /usr/include/sys/siginfo.h ....... /usr/include/sys/machsig.h ..... /usr/include/synch.h ...... /usr/include/sys/machlock.h ....... /usr/include/v7/sys/privregs.h ........ /usr/include/v7/sys/psr.h ........ /usr/include/sys/fsr.h ...... /usr/include/sys/synch.h .... /usr/include/pthread.h ..... /usr/include/sched.h .... /usr/include/signal.h ..... /usr/include/iso/signal_iso.h ..... /usr/include/sys/procset.h .. /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/include/private/../gc_mark.h ... /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/include/private/../gc.h .. /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/include/private/gcconfig.h ... /usr/include/errno.h .... /usr/include/sys/errno.h ... /usr/include/sys/vmparam.h ... /usr/include/unistd.h .. /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/include/private/gc_hdrs.h .. /usr/include/stdlib.h ... /usr/include/iso/stdlib_iso.h .. /export/home/Scratch/hgs/gcc-build/gcc/include/stddef.h .. /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/include/private/gc_locks.h .. /usr/include/string.h ... /usr/include/iso/string_iso.h . /export/home/Scratch/hgs/gcc-build/gcc/include/stdio.h .. /export/home/Scratch/hgs/gcc-build/gcc/include/stdarg.h .. /usr/include/iso/stdio_iso.h ... /usr/include/sys/va_list.h ... /export/home/Scratch/hgs/gcc-build/gcc/include/stdio_tag.h ... /usr/include/stdio_impl.h . /usr/include/sys/elf.h .. /usr/include/sys/elftypes.h . /usr/include/dlfcn.h . /usr/local/include/link.h /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c: In function `GC_FirstDLOpenedLinkMap': /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:110: error: syntax error before "_DYNAMIC" /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:111: error: `Elf32_Dyn' undeclared (first use in this function) /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:111: error: (Each undeclared identifier is reported only once /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:111: error: for each function it appears in.) /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:111: error: `dp' undeclared (first use in this function) /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:114: error: syntax error before '*' token /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:127: error: `dynStructureAddr' undeclared (first use in this function) /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:127: error: `_DYNAMIC' undeclared (first use in this function) /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:135: error: parse error before ')' token /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:136: error: `DT_DEBUG' undeclared (first use in this function) /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:139: error: dereferencing pointer to incomplete type /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c: In function `GC_register_dynamic_libraries': /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:209: error: dereferencing pointer to incomplete type /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:227: error: dereferencing pointer to incomplete type /export/home/Scratch/hgs/gcc-3.4.3/boehm-gc/dyn_load.c:229: error: dereferencing pointer to incomplete type bash-2.05$
So it isn't actually picking up /usr/include/sys/link.h (which I've already shown exists.) It is finding other stuff in that directory, so it's not for lack of a -I flag.
The /usr/local/include/link.h that it finds:
brains hgs 154 %> ls -l /usr/local/include/link.h -rwxr-xr-x 1 root bin 1157 Mar 19 2004 /usr/local/include/link.h brains hgs 155 %> more !$ more /usr/local/include/link.h /* dttools is Copyright (C) 2002 Douglas Thain This software is released under the GNU General Public License. See the file COPYING for details. */
#ifndef LINK_H #define LINK_H
#include <time.h>
/* Maximum number of characters in a link address */ #define LINK_ADDRESS_MAX 17
/* Value to usewhen any listen port is acceptable */ #define LINK_PORT_ANY 0
struct link * link_serve( int port ); struct link * link_accept( struct link *master, time_t stoptime ); struct link * link_connect( const char *addr, int port, time_t stoptime );
int link_read( struct link *link, char *data, int length, time_t stoptime ); int link_write( struct link *link, const char *data, int length, time_t stoptim e ); int link_sleep( struct link *link, time_t stoptime, int reading, int writing ); void link_close( struct link *link ); int link_fd( struct link *link );
int link_readline( struct link *link, char *line, int length, time_t stoptime ) ; int link_nonblocking( struct link *link, int onoff );
int link_address_local( struct link *link, char *addr, int *port ); int link_address_remote( struct link *link, char *addr, int *port );
#endif /* 12 blank lines elided for this e-mail - [EMAIL PROTECTED] */
brains hgs 156 %>
This is totally unlike /usr/include/link.h, but I don't see why it should be picked up by what must be a directive such as
#include <sys/link.h>
So I think this file isn't relevant.
I'm not sure how to proceed though.
Thank you, Hugh