Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: move 'EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)' at the end of E… #101

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Makefile: move 'EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)' at the end of E…
…XTRA_FLAGS assignment

At the moment USER_EXTRA_CFLAGS can't override local Makfile EXTRA_CFLAGS
since it's assigned at the beginning of the Makefile. For example it's not
possible to undefine the hardcoded CONFIG_LITTLE_ENDIAN and this doesn't
allow to build these modules for big endian architectures. So let's move
the assignment of USER_EXTRA_CFLAGS to EXTRA_CFLAGS after the last
EXTRA_CFLAGS assignment.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
  • Loading branch information
giuliobenetti committed Jul 16, 2023
commit f48d99fab8b79e573850067a3ff2d8c16aa95ce1
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
EXTRA_CFLAGS += -O1
#EXTRA_CFLAGS += -O3
#EXTRA_CFLAGS += -Wall
Expand Down Expand Up @@ -2208,6 +2207,8 @@ ifneq ($(USER_MODULE_NAME),)
MODULE_NAME := $(USER_MODULE_NAME)
endif

EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)

ifneq ($(KERNELRELEASE),)

########### this part for *.mk ############################
Expand Down
Loading