b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | --- a/tools/env/Makefile |
| 2 | +++ b/tools/env/Makefile |
| 3 | @@ -8,6 +8,13 @@ |
| 4 | # with "CC" here for the maximum code reuse of scripts/Makefile.host. |
| 5 | override HOSTCC = $(CC) |
| 6 | |
| 7 | +ifneq ($(TARGET_CFLAGS),) |
| 8 | +KBUILD_HOSTCFLAGS = $(TARGET_CFLAGS) |
| 9 | +endif |
| 10 | +ifneq ($(TARGET_LDFLAGS),) |
| 11 | +KBUILD_HOSTLDFLAGS = $(TARGET_LDFLAGS) |
| 12 | +endif |
| 13 | + |
| 14 | # Compile for a hosted environment on the target |
| 15 | HOST_EXTRACFLAGS = -I$(srctree)/tools \ |
| 16 | $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \ |