1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 22:43:17 +02:00

buildsystem: Determine the endianness only in the buildsystem

Let the buildsystem (make / meson) handle the endianness determination
and set the __FLASHROM_LITTLE_ENDIAN__ or __FLASHROM_BIG_ENDIAN__ macro
as cflag.

Change-Id: I37093528ae55e712cc30a0267a8ceac332750e7d
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58273
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
This commit is contained in:
Thomas Heijligen
2021-10-12 16:47:43 +02:00
committed by Nico Huber
parent ba1c5eb125
commit b583647888
3 changed files with 14 additions and 89 deletions

View File

@ -29,6 +29,13 @@ add_project_arguments('-D_POSIX_C_SOURCE=200809L', language : 'c') # required fo
add_project_arguments('-D_BSD_SOURCE', language : 'c') # required for glibc < v2.19
add_project_arguments('-DFLASHROM_VERSION="' + meson.project_version() + '"', language : 'c')
if host_machine.endian() == 'little'
add_project_arguments('-D__FLASHROM_LITTLE_ENDIAN__=1', language : 'c')
endif
if host_machine.endian() == 'big'
add_project_arguments('-D__FLASHROM_BIG_ENDIAN__=1', language : 'c')
endif
# get defaults from configure
config_atahpt = get_option('config_atahpt')
config_atapromise = get_option('config_atapromise')