Projects STRLCPY criu Commits e7aba32e
🤬
  • tools.mk: support override CC/LD command line

    due to Android NDK's clang is x86_64-linux-android28-clang --sysroot ${SYSROOT_PATH}
    and it's ld is x86_64-linux-android-ld,
    it's not able to use a single pattern to discript clang and ld.
    
    and there is a error for x86_64-linux-android-ld.
    x86_64-linux-android-ld  -L/home/ning/source/criu/protobuf-c/../target/lib -lprotobuf-c -r -z noexecstack -T ./compel/arch/x86/scripts/compel-pack.lds.S  -o criu/pie/parasite.built-in.o  criu/pie/parasite.o criu/pie/pie.lib.a ./compel/plugins/std.lib.a
    ./compel/compel-host hgen -f criu/pie/parasite.built-in.o -o criu/pie/parasite-blob.h
    Error (compel/src/lib/handle-elf-host.c:335): Unexpected undefined symbol: `'. External symbol in PIE?
    criu/pie/Makefile:49: recipe for target 'criu/pie/parasite-blob.h' failed
    
    rebuild with host ld, can pass build.
    
    so support override CC/LD from command line can pass build.
    
    Cc: Chen Hu <[email protected]>
    Signed-off-by: Zhang Ning <[email protected]>
    Reviewed-by: Dmitry Safonov <[email protected]>
    Signed-off-by: Andrei Vagin <[email protected]>
  • Loading...
  • Zhang Ning committed with Andrei Vagin 5 years ago
    e7aba32e
    1 parent f4fa53cf
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    scripts/nmk/scripts/tools.mk
    skipped 3 lines
    4 4  # System tools shorthands
    5 5  RM := rm -f
    6 6  HOSTLD ?= ld
    7  -LD := $(CROSS_COMPILE)$(HOSTLD)
     7 +LD ?= $(CROSS_COMPILE)$(HOSTLD)
    8 8  HOSTCC ?= gcc
    9  -CC := $(CROSS_COMPILE)$(HOSTCC)
     9 +CC ?= $(CROSS_COMPILE)$(HOSTCC)
    10 10  CPP := $(CC) -E
    11 11  AS := $(CROSS_COMPILE)as
    12 12  AR := $(CROSS_COMPILE)ar
    skipped 26 lines
Please wait...
Page is in error, reload to recover