This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/5] constify to_terminal_info
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: tromey at redhat dot com, gdb-patches at sourceware dot org
- Date: Fri, 03 May 2013 17:48:30 +0100
- Subject: Re: [PATCH 2/5] constify to_terminal_info
- References: <871u9yiku2 dot fsf at fleche dot redhat dot com> <517AD1BA dot 6060503 at redhat dot com> <83bo91t2vr dot fsf at gnu dot org>
On 04/26/2013 10:10 PM, Eli Zaretskii wrote:
>> Date: Fri, 26 Apr 2013 20:12:58 +0100
>> From: Pedro Alves <palves@redhat.com>
>> CC: gdb-patches@sourceware.org
>>
>> I've built this with the djgpp f17 cross toolchain found at
>> <ftp://ftp.delorie.com/pub/djgpp/rpms/>.
>>
>> No build regressions.
>>
>> (though there are other unrelated build issues).
>
> Anything I should know about, or can help with resolving?
I've put a set of 4 incomplete patches/hacks I needed to build
djgpp gdb on f17 (--host=i586-pc-msdosdjgpp) at:
https://github.com/palves/gdb/commits/djgpp_build_fixes
That's gcc 4.7.2.
In addition, when building readline/, the build errors out with:
make: *** No rule to make target `/config.h', needed by `readline.o'. Stop.
That's because I somehow end up with an empty BUILD_DIR in
readline/Makefile:
...
BUILD_DIR =
...
To work around it, I cd to the readline build dir, and do
$ make BUILD_DIR=.
and then
echo "all:" > readline/Makefile
Another issue is that in the gdb/Makefile, I end up with
CC set twice:
$ grep "^CC.*gcc" Makefile
CC=i586-pc-msdosdjgpp-gcc
CC= gcc
and the second one is of course, wrong. configure does find
i586-pc-msdosdjgpp-gcc:
...
checking for i586-pc-msdosdjgpp-gcc... i586-pc-msdosdjgpp-gcc
checking for C compiler default output file name... a.out
...
and I don't get this on the other subdirs (bfd, etc.)
So if I cd into build/gdb and do "make", the system gcc instead
of the djgpp gcc is invoked:
$ make
make[1]: Entering directory `/home/pedro/gdb/mygit/build-djgpp-2/gdb'
...
gcc -g -O2 -I../../src/gdb/config/djgpp -I. -I../../src/gdb -I../../src/gdb/common -I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber -I../../src/gdb/../libdecnumber -I./../intl -I../../src/gdb/gnulib/import -Ibuild-gnulib/import -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Werror -c -o init.o -MT init.o -MMD -MP -MF .deps/init.Tpo init.c
rm -f gdb.exe
gcc -g -O2 -I../../src/gdb/config/djgpp -static-libstdc++ -static-libgcc \
-o gdb.exe gdb.o i386-tdep.o i387-tdep.o ser-go32.o go32-nat.o i386-nat.o remote.o dcache.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o remote-notif.o ctf.o cli-dump.o cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-logging.o cli-interp.o cli-utils.o mi-out.o mi-console.o mi-cmds.o mi-cmd-catch.o mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o mi-cmd-target.o mi-cmd-info.o mi-interp.o mi-main.o mi-parse.o mi-getopt.o python.o py-value.o py-prettyprint.o py-auto-load.o posix-hdep.o c-exp.o cp-name-parser.o ada-exp.o jv-exp.o f-exp.o go-exp.o m2-exp.o p-exp.o version.o annotate.o addrmap.o auto-load.o auxv.o agent.o bfd-target.o blockframe.o breakpoint.o break-catch-sig.o break-catch-throw.o findvar.o regcache.o cleanups.o charset.o continuations.o corelow.o disasm.o dummy-frame.o dfp.o source.o value.o eval.o valops.o valarith.o valprint.o printcmd.o block.o symtab.o psymtab.o symfile.o symmisc.o lin!
espec.o
dictionary.o infcall.o infcmd.o infrun.o expprint.o environ.o stack.o thread.o exceptions.o filesystem.o filestuff.o inf-child.o interps.o minidebug.o main.o macrotab.o macrocmd.o macroexp.o macroscope.o mi-common.o event-loop.o event-top.o inf-loop.o completer.o gdbarch.o arch-utils.o gdbtypes.o gdb_bfd.o gdb_obstack.o osabi.o copying.o memattr.o mem-break.o target.o parse.o language.o buildsym.o findcmd.o std-regs.o signals.o exec.o reverse.o bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o dbxread.o coffread.o coff-pe-read.o dwarf2read.o mipsread.o stabsread.o corefile.o dwarf2expr.o dwarf2loc.o dwarf2-frame.o dwarf2-frame-tailcall.o ada-lang.o c-lang.o d-lang.o f-lang.o objc-lang.o ada-tasks.o ada-varobj.o ui-out.o cli-out.o varobj.o vec.o go-lang.o go-valprint.o go-typeprint.o jv-lang.o jv-valprint.o jv-typeprint.o m2-lang.o opencl-lang.o p-lang.o p-typeprint.o p-valprint.o sentinel-frame.o complaints.o typeprint.o ada-typeprint.o c-typeprint.o f-typeprint.o
m2-typeprint.o ada-valprint.o c-valprint.o cp-valprint.o d-valprint.o f-valprint.o m2-valprint.o serial.o mdebugread.o top.o utils.o ui-file.o user-regs.o frame.o frame-unwind.o doublest.o frame-base.o inline-frame.o gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o cp-namespace.o reggroups.o regset.o trad-frame.o tramp-frame.o solib.o solib-target.o prologue-value.o memory-map.o memrange.o xml-support.o xml-syscall.o xml-utils.o target-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o inferior.o osdata.o gdb_usleep.o record.o record-full.o gcore.o gdb_vecs.o jit.o progspace.o skip.o probe.o common-utils.o buffer.o ptid.o gdb-dlfcn.o common-agent.o format.o registry.o btrace.o record-btrace.o inflow.o init.o \
../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ./../intl/libintl.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -ldbg -lm ../libiberty/libiberty.a build-gnulib/import/libgnu.a
gdb.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make: *** [gdb.exe] Error 1
and that of course isn't the right compiler to use, and things
fall apart.
When make is invoked from the top build dir, the correct CC is passed
down to the gdb/ sub make, so the workaround is to "cd ..; make".
--
Pedro Alves