Changeset 98404


Ignore:
Timestamp:
Oct 4, 2012, 7:19:06 PM (12 years ago)
Author:
blair@…
Message:

gdb: prevent compiler failure: do not compile if cctools-headers is installed.

This prevents the following compile failure which is caused by
bfd/mach-o.h including mach-o/loader.h, which is found in
${prefix}/include instead of gdb's source directory. The file in
${prefix}/include doesn't define the symbols that gdb needs.

/usr/bin/clang -pipe -O2 -I/opt/local/include -Wno-unused-value -arch x86_64 -I. -I. -I./common -I./config -DLOCALEDIR="\"/opt/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -c -o solib-darwin.o -MT solib-darwin.o -MMD -MP -MF .deps/solib-darwin.Tpo solib-darwin.c
In file included from solib-darwin.c:43:
../bfd/mach-o.h:510:3: error: unknown type name 'bfd_mach_o_load_command_type'; did you mean 'bfd_mach_o_uuid_command'?

bfd_mach_o_load_command_type type;
~
bfd_mach_o_uuid_command

../bfd/mach-o.h:438:1: note: 'bfd_mach_o_uuid_command' declared here
bfd_mach_o_uuid_command;

../bfd/mach-o.h:592:39: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
int bfd_mach_o_lookup_command (bfd *, bfd_mach_o_load_command_type, bfd_mach_o_load_command );

~

../bfd/mach-o.h:613:43: warning: declaration of 'enum bfd_mach_o_cpu_type' will not be visible outside of this function [-Wvisibility]
unsigned long bfd_mach_o_stack_addr (enum bfd_mach_o_cpu_type);


../bfd/mach-o.h:619:47: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
const bfd_target *bfd_mach_o_header_p (bfd *, bfd_mach_o_filetype,


../bfd/mach-o.h:620:40: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]

bfd_mach_o_cpu_type);

solib-darwin.c:223:38: error: use of undeclared identifier 'BFD_MACH_O_LC_LOAD_DYLINKER'

BFD_MACH_O_LC_LOAD_DYLINKER, &cmd) == 1)

solib-darwin.c:295:22: error: use of undeclared identifier 'BFD_MACH_O_MH_MAGIC'

if (hdr_val != BFD_MACH_O_MH_MAGIC && hdr_val != BFD_MACH_O_MH_MAGIC_64)


solib-darwin.c:295:56: error: use of undeclared identifier 'BFD_MACH_O_MH_MAGIC_64'

if (hdr_val != BFD_MACH_O_MH_MAGIC && hdr_val != BFD_MACH_O_MH_MAGIC_64)


solib-darwin.c:300:22: error: use of undeclared identifier 'BFD_MACH_O_MH_EXECUTE'

if (hdr_val == BFD_MACH_O_MH_EXECUTE)


4 warnings and 5 errors generated.
make[2]: * [solib-darwin.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5/gdb'
make[1]:
* [all-gdb] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5'
make: * [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5'
Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5" && /usr/bin/make -w all
Exit code: 2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/gdb/Portfile

    r98401 r98404  
    4747}
    4848
     49pre-configure {
     50    if {[file exists ${prefix}//include/mach-o/loader.h]} {
     51        ui_error "cctools-headers must be deactivated before upgrade."
     52        error "Please run `sudo port deactivate cctools-headers` and try again."
     53    }
     54}
     55
    4956configure.args-append \
    5057    --infodir=${prefix}/share/info \
Note: See TracChangeset for help on using the changeset viewer.