Skip to content

Commit 1625e40

Browse files
cedriclandetfedor-rybin
authored andcommitted
Setting large code model for kernel RTS on 64 bits architectures.
The large code model which is now the default for kernel RTS (not triggered by the large multilib anymore) on 64 bits architectures. TN: UB03-045 Tested-with: $ anod test cross-testsuite \ --target=x86_64-vx7r2,7.2,vxsim-64 \ --qualifier=rts=kernel $ anod test cross-testsuite \ --target=aarch64-vx7r2,7.2,vxsim-64 \ --qualifier=rts=kernel $ anod test cross-testsuite \ --target=ppc64-vx7r2,7.2,vxsim-64 \ --qualifier=rts=kernel
1 parent bebd12a commit 1625e40

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,22 @@ CONF_ARGS = $(TARGET_CONF) $(RTS_CONF)
2727
GPROPTS = $(CONF_ARGS) -XAUNIT_BUILD_MODE=$(MODE) -XAUNIT_RUNTIME=$(RTS) \
2828
-XAUNIT_PLATFORM=$(TARGET)
2929

30+
# For the 64 bits architectures, the large code model has to be used.
31+
# with rtp-large, gprconfig ensures that -mcmodel=large is used,
32+
# but it is managed here for the default (kernel).
33+
GPROPTS_EXTRA=
34+
ifneq ($(strip $(filter aarch64-wrs-vxworks7r2 powerpc64-wrs-vxworks7r2 x86_64-wrs-vxworks7r2,$(TARGET))),)
35+
ifeq (${RTS_CONF},)
36+
# This covers the kernel RTS because for rtp, the RTS_OPT variable is defined to --RTS=rtp.
37+
# kernel is the default and the RTS_OPT is not set in that case.
38+
GPROPTS_EXTRA+=-cargs -mcmodel=large -largs -mcmodel=large
39+
endif
40+
endif
41+
3042
.PHONY: all clean targets install_clean install
3143

3244
all:
33-
$(GPRBUILD) -p $(GPROPTS) lib/gnat/aunit.gpr
45+
$(GPRBUILD) -p $(GPROPTS) lib/gnat/aunit.gpr ${GPROPTS_EXTRA}
3446

3547
clean-lib:
3648
$(RM) -fr lib/aunit lib/aunit-obj

0 commit comments

Comments
 (0)