diff mbox series

[v1] mmc-utils: makefile: cross compile

Message ID CABqN7Bz9ajpsVP00sYkRRyOaTujGALwG30rVAwnpgzoOrC3U9g@mail.gmail.com (mailing list archive)
State New
Headers show
Series [v1] mmc-utils: makefile: cross compile | expand

Commit Message

Zhan Liu April 20, 2024, 3:16 a.m. UTC
[PATCH v1] mmc-utils: makefile: cross compile

From: Zhan Liu <liuzhanjobs@gmail.com>

Problem and my changes

Current makefile can only compile for local gcc (x86). Add cross
compile so we can easily compile for other platform by doing “make
CROSS_GCC=/path/to/your/cross/compiler” .



---

Signed-off-by:  Zhan Liu <liuzhanjobs@gmail.com?


+++ b/Makefile
@@@ -1,4 -1,5 +1,4 @@@
- CC ?= gcc
+ CC = $(CROSS_GCC)gcc
 -
  GIT_VERSION := "$(shell git describe --abbrev=6 --always --tags)"
  AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 \
            -DVERSION=\"$(GIT_VERSION)\"
diff mbox series

Patch

diff --cc Makefile
index a890833,efb2ec8..0000000
--- a/Makefile