Commit b8e5484647e98adc362a9c8bc03a5a1b0912c59a

Authored by Daniel Wagenknecht
Committed by Jay Berkenbilt
1 parent df38fe8e

Specify tag with libtool

This solves
  libtool: compile: unable to infer tagged configuration
  libtool:   error: specify a tag with '--tag'
build issues when using toolchain that prevents libtools
inference rules from working correctly (e.g. ccache).
Showing 1 changed file with 5 additions and 4 deletions
make/libtool.mk
@@ -60,7 +60,7 @@ endef @@ -60,7 +60,7 @@ endef
60 # 1 2 60 # 1 2
61 # Usage: $(call libcompile,src,includes) 61 # Usage: $(call libcompile,src,includes)
62 define libcompile 62 define libcompile
63 - $(LIBTOOL) --quiet --mode=compile \ 63 + $(LIBTOOL) --quiet --mode=compile --tag=CXX \
64 $(CXX) $(CXXFLAGS) \ 64 $(CXX) $(CXXFLAGS) \
65 $(call libdepflags,$(basename $(call src_to_obj,$(1)))) \ 65 $(call libdepflags,$(basename $(call src_to_obj,$(1)))) \
66 $(foreach I,$(2),-I$(I)) \ 66 $(foreach I,$(2),-I$(I)) \
@@ -72,7 +72,7 @@ endef @@ -72,7 +72,7 @@ endef
72 # 1 2 72 # 1 2
73 # Usage: $(call libcompile,src,includes) 73 # Usage: $(call libcompile,src,includes)
74 define c_libcompile 74 define c_libcompile
75 - $(LIBTOOL) --quiet --mode=compile \ 75 + $(LIBTOOL) --quiet --mode=compile --tag=CC \
76 $(CC) $(CFLAGS) \ 76 $(CC) $(CFLAGS) \
77 $(call libdepflags,$(basename $(call c_src_to_obj,$(1)))) \ 77 $(call libdepflags,$(basename $(call c_src_to_obj,$(1)))) \
78 $(foreach I,$(2),-I$(I)) \ 78 $(foreach I,$(2),-I$(I)) \
@@ -92,7 +92,7 @@ endef @@ -92,7 +92,7 @@ endef
92 # 1 2 3 4 5 6 7 92 # 1 2 3 4 5 6 7
93 # Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age) 93 # Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
94 define makelib 94 define makelib
95 - $(LIBTOOL) --mode=link \ 95 + $(LIBTOOL) --mode=link --tag=CXX \
96 $(CXX) $(CXXFLAGS) $(LD_VERSION_FLAGS) \ 96 $(CXX) $(CXXFLAGS) $(LD_VERSION_FLAGS) \
97 -o $(2) $(1) $(3) $(4) \ 97 -o $(2) $(1) $(3) $(4) \
98 $(RPATH) -version-info $(5):$(6):$(7) -no-undefined 98 $(RPATH) -version-info $(5):$(6):$(7) -no-undefined
@@ -101,7 +101,8 @@ endef @@ -101,7 +101,8 @@ endef
101 # 1 2 3 4 5 101 # 1 2 3 4 5
102 # Usage: $(call makebin,objs,binary,ldflags,libs,xlinkflags) 102 # Usage: $(call makebin,objs,binary,ldflags,libs,xlinkflags)
103 define makebin 103 define makebin
104 - $(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(5) $(1) -o $(2) $(3) $(4) 104 + $(LIBTOOL) --mode=link --tag=CXX \
  105 + $(CXX) $(CXXFLAGS) $(5) $(1) -o $(2) $(3) $(4)
105 endef 106 endef
106 107
107 # Install target 108 # Install target