You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is perfectly legal to override CFLAGS on the command line,
but this doesn't work with libocxl:
$ make V=1 CFLAGS='-g'
VERSION_MAJOR=1 VERSION_MINOR=1 \
VERSION_PATCH=0 CC="gcc" CFLAGS="-g" \
./version.pl > src/libocxl_info.h
mkdir obj
gcc -g -c -o obj/afu.o src/afu.c
In file included from src/afu.c:17:
src/libocxl_internal.h:25:10: fatal error: libocxl.h: No such file or directory
25 | #include "libocxl.h"
| ^~~~~~~~~~~
compilation terminated.
This is especially painful for some building frameworks that rely on
that, eg. buildroot.
The GNU make documentation clearly indicates that overriding a variable
on the command line causes ordinary assignments to this variable in the
makefile to be ignored.
Use the override directive so that we can add the required items to
CFLAGS.
https://ftp.gnu.org/old-gnu/Manuals/make-3.79.1/html_chapter/make_6.html#SEC66
Signed-off-by: Greg Kurz <groug@kaod.org>
0 commit comments