Two build != host fixes

Eric Botcazou ebotcazou@adacore.com
Thu Dec 12 12:27:00 GMT 2013


> 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



More information about the Gcc-patches mailing list