diff --git a/deos/__init__.py b/deos/__init__.py index c85a8b37..14a93f44 100644 --- a/deos/__init__.py +++ b/deos/__init__.py @@ -7,6 +7,10 @@ def __init__(self): super(Deos, self).__init__() self.add_gnat_sources("src/s-macres__deos.adb") + @property + def has_command_line_arguments(self): + return True + @property def has_single_precision_fpu(self): return True diff --git a/pikeos/__init__.py b/pikeos/__init__.py index 2f152aae..4922d78e 100644 --- a/pikeos/__init__.py +++ b/pikeos/__init__.py @@ -4,6 +4,10 @@ class PikeOS(Target): + @property + def has_command_line_arguments(self): + return True + @property def has_double_precision_fpu(self): return True diff --git a/qnx/__init__.py b/qnx/__init__.py index 4e3a62d5..baede0df 100644 --- a/qnx/__init__.py +++ b/qnx/__init__.py @@ -6,6 +6,10 @@ def __init__(self): super(QNX, self).__init__() self.add_gnat_sources('src/s-macres__qnx.adb') + @property + def has_command_line_arguments(self): + return True + def has_libc(self, profile): return True @@ -25,7 +29,6 @@ def is_legacy_format(self): def use_certifiable_packages(self): return True - class Aarch64QNX(QNX): def __init__(self): super(Aarch64QNX, self).__init__() diff --git a/src/system/system-deos-arm-light.ads b/src/system/system-deos-arm-light.ads index a8ce493e..5c3e62ca 100644 --- a/src/system/system-deos-arm-light.ads +++ b/src/system/system-deos-arm-light.ads @@ -142,7 +142,7 @@ private Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := False; + Command_Line_Args : constant Boolean := True; Configurable_Run_Time : constant Boolean := True; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; diff --git a/src/system/system-qnx-arm-light-tasking.ads b/src/system/system-qnx-arm-light-tasking.ads index 2211fd22..912b0e55 100644 --- a/src/system/system-qnx-arm-light-tasking.ads +++ b/src/system/system-qnx-arm-light-tasking.ads @@ -151,7 +151,7 @@ private Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := False; + Command_Line_Args : constant Boolean := True; Configurable_Run_Time : constant Boolean := True; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; diff --git a/src/system/system-qnx-arm-light.ads b/src/system/system-qnx-arm-light.ads index 84842f20..a1982e0a 100644 --- a/src/system/system-qnx-arm-light.ads +++ b/src/system/system-qnx-arm-light.ads @@ -148,7 +148,7 @@ private Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := False; + Command_Line_Args : constant Boolean := True; Configurable_Run_Time : constant Boolean := True; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; diff --git a/src/system/system-vxworks7-arm-ravenscar-sfp-rtp.ads b/src/system/system-vxworks7-arm-ravenscar-sfp-rtp.ads index 0adc02c6..d17cde64 100644 --- a/src/system/system-vxworks7-arm-ravenscar-sfp-rtp.ads +++ b/src/system/system-vxworks7-arm-ravenscar-sfp-rtp.ads @@ -159,7 +159,7 @@ private Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := False; + Command_Line_Args : constant Boolean := True; Configurable_Run_Time : constant Boolean := True; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; diff --git a/src/system/system-vxworks7-ppc-ravenscar-sfp-rtp.ads b/src/system/system-vxworks7-ppc-ravenscar-sfp-rtp.ads index 109c6a84..989a2c1b 100644 --- a/src/system/system-vxworks7-ppc-ravenscar-sfp-rtp.ads +++ b/src/system/system-vxworks7-ppc-ravenscar-sfp-rtp.ads @@ -159,7 +159,7 @@ private Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := False; + Command_Line_Args : constant Boolean := True; Configurable_Run_Time : constant Boolean := True; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; diff --git a/src/system/system-vxworks7-ppc64-ravenscar-sfp-rtp.ads b/src/system/system-vxworks7-ppc64-ravenscar-sfp-rtp.ads index 109c6a84..989a2c1b 100644 --- a/src/system/system-vxworks7-ppc64-ravenscar-sfp-rtp.ads +++ b/src/system/system-vxworks7-ppc64-ravenscar-sfp-rtp.ads @@ -159,7 +159,7 @@ private Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := False; + Command_Line_Args : constant Boolean := True; Configurable_Run_Time : constant Boolean := True; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; diff --git a/src/system/system-vxworks7-x86-ravenscar-sfp-rtp.ads b/src/system/system-vxworks7-x86-ravenscar-sfp-rtp.ads index 29d11cb6..5f5da800 100644 --- a/src/system/system-vxworks7-x86-ravenscar-sfp-rtp.ads +++ b/src/system/system-vxworks7-x86-ravenscar-sfp-rtp.ads @@ -159,7 +159,7 @@ private Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := False; + Command_Line_Args : constant Boolean := True; Configurable_Run_Time : constant Boolean := True; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; diff --git a/support/bsp_sources/target.py b/support/bsp_sources/target.py index 80a9c25c..b79423be 100644 --- a/support/bsp_sources/target.py +++ b/support/bsp_sources/target.py @@ -89,6 +89,11 @@ def has_timer_64(self): """ return False + @property + def has_command_line_arguments(self): + """True if the OS supports command line arguments""" + return False + @property def has_compare_and_swap(self): """True if the hardware supports an atomic compare-and-swap function. @@ -162,7 +167,7 @@ def __init__(self): '-fdata-sections'], 'common_gnarl_flags': [], 'asm_flags': [], - 'c_flags': ['-DIN_RTS', '-Dinhibit_libc']} + 'c_flags': ['-DIN_RTS', '-Dinhibit_libc', '-DLIGHT_RUNTIME']} # GNAT-LLVM doesn't support -fcallgraph-info if target_compiler() != Compiler.gnat_llvm: self.build_flags['common_flags'].append('-fcallgraph-info=su,da') diff --git a/support/rts_sources/profiles.py b/support/rts_sources/profiles.py index 542e251b..87cc9816 100644 --- a/support/rts_sources/profiles.py +++ b/support/rts_sources/profiles.py @@ -151,6 +151,11 @@ def light_scenarios(self, profile='light'): else: ret['Has_FPU'] = 'no' + if self.config.has_command_line_arguments: + ret['Add_Command_Line'] = 'yes' + else: + ret['Add_Command_Line'] = 'no' + if self.config.has_libc(profile): ret['Has_libc'] = 'yes' else: diff --git a/support/rts_sources/sources.py b/support/rts_sources/sources.py index 774fd65b..4d489259 100644 --- a/support/rts_sources/sources.py +++ b/support/rts_sources/sources.py @@ -114,6 +114,7 @@ 'Add_Pack64': ['no', 'yes'], # Various support packages 'Add_Case_Util': ['no', 'yes'], + 'Add_Command_Line': ['no', 'yes'], 'Add_Float_Util': ['no', 'yes'], 'Add_Image_Util': ['no', 'yes'], 'Add_IO_Exceptions': ['no', 'yes'], @@ -223,24 +224,28 @@ 'hie/s-macres.ads', 'hie/s-textio.ads'], 'deos_srcs': [ + 'exit.c', 'hie/g-io__c.ads', 'hie/a-textio__deos.ads', 'hie/a-textio__deos.adb', 'hie/s-macres.ads', ], 'pikeos_srcs': [ 'hie/a-textio.ads', + 'exit.c', 'hie/g-io__zfp.ads', 'hie/g-io__zfp.adb', 'hie/g-io-put__bb.adb', 'hie/s-macres.ads', 'hie/s-parame__large.ads', 'hie/s-parame.adb', 'hie/s-textio.ads'], 'vx7r2cert_srcs': [ + 'exit.c', 'libgnat/g-io.ads', 'hie/g-io__vxworks7cert.adb', 'hie/s-textio__vxworks7cert.ads', 'hie/s-textio__vxworks7cert.adb', 'hie/a-textio.ads', 'hie/a-textio__vxworks7cert.adb', 'hie/s-macres.ads', 'vx_stack_info.c'], 'qnx_srcs': [ + 'exit.c', 'hie/g-io__zfp.ads', 'hie/g-io__zfp.adb', 'hie/g-io-put.adb', 'hie/a-textio.ads', 'hie/a-textio__qnx.adb', @@ -354,6 +359,15 @@ 'libgnat/s-parame__qnx.adb', 'hie/s-init__light.ads'] }, + + # Command Line + 'command_line': { + 'conditions': ['Add_Command_Line:yes'], + 'srcs': ['libgnat/a-comlin.ads', 'libgnat/a-comlin.adb', + 'argv.c', + 'runtime.h'] + }, + 'gccmath': { 'conditions': ['RTS_Profile:light,light-tasking', 'Target_Word_Size:64'], 'srcs': [], diff --git a/vx7r2cert/__init__.py b/vx7r2cert/__init__.py index 01d44ab1..669d9122 100644 --- a/vx7r2cert/__init__.py +++ b/vx7r2cert/__init__.py @@ -9,6 +9,10 @@ def __init__(self, is_rtp): super(Vx7r2Cert, self).__init__() self.add_gnat_sources('src/s-macres__vx7r2cert.adb') + @property + def has_command_line_arguments(self): + return True + @property def has_single_precision_fpu(self): return True