[PATCH] build: Add PROGRAM_PREFIX option
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Aug 2 08:56:53 UTC 2023
On 02.08.23 10:50, Chris Johns wrote:
> On 2/8/2023 6:39 pm, Sebastian Huber wrote:
>> On 02.08.23 10:33, Chris Johns wrote:
>>>> diff --git a/spec/build/bsps/makeinc.yml b/spec/build/bsps/makeinc.yml
>>>> index ac395f2f02..08fc75a8b9 100644
>>>> --- a/spec/build/bsps/makeinc.yml
>>>> +++ b/spec/build/bsps/makeinc.yml
>>>> @@ -16,14 +16,14 @@ content: |
>>>> prefix = ${PREFIX}
>>>> exec_prefix = $${prefix}/${ARCH}-rtems${__RTEMS_MAJOR__}
>>>> - CC_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-gcc
>>>> - CXX_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-g++
>>>> - AS_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-as
>>>> - AR_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ar
>>>> - NM_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-nm
>>>> - LD_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ld
>>>> - SIZE_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-size
>>>> - OBJCOPY_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
>>>> + CC_FOR_TARGET = ${PROGRAM_PREFIX}gcc
>>>> + CXX_FOR_TARGET = ${PROGRAM_PREFIX}g++
>>> Is it worth doing the same to gcc and g++ as well so these can be replaced as
>>> well?
>> Yes, but this would be another patch and it is a bit more work since you have to
>> test the clang support.
>>
>>>> + AS_FOR_TARGET = ${PROGRAM_PREFIX}as
>>>> + AR_FOR_TARGET = ${PROGRAM_PREFIX}ar
>>>> + NM_FOR_TARGET = ${PROGRAM_PREFIX}nm
>>>> + LD_FOR_TARGET = ${PROGRAM_PREFIX}ld
>>>> + SIZE_FOR_TARGET = ${PROGRAM_PREFIX}size
>>>> + OBJCOPY_FOR_TARGET = ${PROGRAM_PREFIX}objcopy
>>> Where is PROGRAM_PFREFIX set?
>> It is a new configuration option:
>>
>> [sparc/gr740]
>> PROGRAM_PREFIX = ${ARCH}-rtems7-
>>
> Yes, but if these files are installed does it need to be in defined in those files?
The option substitution takes place before the files are installed. For
example:
cat /opt/rtems/6/arm-rtems6/xilinx_zynq_a9_qemu/Makefile.inc
#
# BSP specific settings. To be included in application Makefiles
#
# This support will be removed from RTEMS. Please consider other
# ways to build applications.
#
RTEMS_API = 6
RTEMS_CPU = arm
RTEMS_BSP = xilinx_zynq_a9_qemu
prefix = /opt/rtems/6
exec_prefix = ${prefix}/arm-rtems6
CC_FOR_TARGET = arm-rtems7-gcc
CXX_FOR_TARGET = arm-rtems7-g++
AS_FOR_TARGET = arm-rtems7-as
AR_FOR_TARGET = arm-rtems7-ar
NM_FOR_TARGET = arm-rtems7-nm
LD_FOR_TARGET = arm-rtems7-ld
SIZE_FOR_TARGET = arm-rtems7-size
OBJCOPY_FOR_TARGET = arm-rtems7-objcopy
CC= $(CC_FOR_TARGET)
CXX= $(CXX_FOR_TARGET)
AS= $(AS_FOR_TARGET)
LD= $(LD_FOR_TARGET)
NM= $(NM_FOR_TARGET)
AR= $(AR_FOR_TARGET)
SIZE= $(SIZE_FOR_TARGET)
OBJCOPY= $(OBJCOPY_FOR_TARGET)
export CC
export CXX
export AS
export LD
export NM
export AR
export SIZE
export OBJCOPY
RTEMS_ROOT ?= $(prefix)
PROJECT_ROOT = $(RTEMS_ROOT)
RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
RTEMS_SHARE = $(RTEMS_ROOT)/share/rtems$(RTEMS_API)
RTEMS_USE_OWN_PDIR = no
RTEMS_HAS_POSIX_API =
RTEMS_HAS_ITRON_API = no
RTEMS_HAS_CPLUSPLUS = yes
export RTEMS_BSP
export RTEMS_CUSTOM
export PROJECT_ROOT
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list