This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: Two build != host fixes
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Iain Sandoe <iain at codesourcery dot com>, Alan Modra <amodra at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, DJ Delorie <dj at redhat dot com>
- Date: Thu, 12 Dec 2013 14:19:35 +0100
- Subject: RE: Two build != host fixes
- Authentication-results: sourceware.org; auth=none
- References: <DUB122-W49C1420F5ADBBBFF956A3EE4DD0 at phx dot gbl> <3486884 dot DcvUWbD7kJ at polaris> <DUB122-W87A3B832D05C543F919F3E4DC0 at phx dot gbl>,<6411678 dot Qjexcsu97i at polaris>
>
>> your patch looks quite nice, (maybe s/host_alias= @host_alias@/host_alias =
>> @host_alias@/)
>
> Thanks for spotting it, now fixed.
>
>> but I have to make a few more patches, to get it working:
>>
>>
>> error: "system.ads" has restriction No_Implicit_Dynamic_Code
>> error: but the following files violate this restriction:
>> error: "make.adb"
>> error: "makeutl.adb"
>> error: "prj.adb"
>> error: "prj-env.adb"
>> error: "prj-conf.adb"
>> error: "prj-proc.adb"
>> error: "prj-nmsc.adb"
>>
>>
>> that's the most weird point. If I get rid of that pragma, and re-build
>> everything I get something that looks like a working gcc/gnat.
>
> Nice progress! To be fair, the violation of No_Implicit_Dynamic_Code was also
> reported under PR ada/55946, but the fix isn't to remove the pragma, as this
> particular version of system.ads should be used only to build the compiler and
> not the tools. This issue is supposed to be addressed by the RTS_DIR thing:
>
> # Put the host RTS dir first in the PATH to hide the default runtime
> # files that are among the sources
> RTS_DIR:=$(strip $(subst \,/,$(shell $(GNATLS_FOR_HOST) -v | grep adalib )))
>
> TOOLS_FLAGS_TO_PASS_CROSS= \
> "CC=$(CC)" \
> "CXX=$(CXX)" \
> "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
> "LDFLAGS=$(LDFLAGS)" \
> "ADAFLAGS=$(ADAFLAGS)" \
> "ADA_CFLAGS=$(ADA_CFLAGS)" \
> "INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
> "ADA_INCLUDES=-I$(RTS_DIR)../adainclude -I$(RTS_DIR)
>
> Could you post the command line for the compilation of one of the problematic
> units for the gnattools?
>
> --
> Eric Botcazou
arm-linux-gnueabihf-gcc -c -I./ -I/home/ed/gnu/x/arm-linux-gnueabihf-linux64/lib/gcc/arm-linux-gnueabihf/4.9.0/adalib/../adainclude -I/home/ed/gnu/x/arm-linux-gnueabihf-linux64/lib/gcc/arm-linux-gnueabihf/4.9.0/adalib/ -I. -I/home/ed/gnu/x/gcc-4.9-20131208/gcc/ada -g -O2 -W -Wall -gnatpg -gnata -I- /home/ed/gnu/x/gcc-4.9-20131208/gcc/ada/makeutl.adb
arm-linux-gnueabihf-gcc -c -I./ -I/home/ed/gnu/x/arm-linux-gnueabihf-linux64/lib/gcc/arm-linux-gnueabihf/4.9.0/adalib/../adainclude -I/home/ed/gnu/x/arm-linux-gnueabihf-linux64/lib/gcc/arm-linux-gnueabihf/4.9.0/adalib/ -I. -I/home/ed/gnu/x/gcc-4.9-20131208/gcc/ada -g -O2 -W -Wall -gnatpg -gnata -I- /home/ed/gnu/x/gcc-4.9-20131208/gcc/ada/prj-env.adb
/home/ed/gnu/x/arm-linux-gnueabihf-linux64: where the build=host target=arm-linux-gnueabihf compiler is installed.
Bernd.