Skip to content

Commit dcfd743

Browse files
vriesdavidmalcolm
authored andcommitted
Makefile: Propagate correct srcdir to gcc-c-api submake
If srcdir=/a/b is defined in the environment or on the make command line, then srcdir is inherited with the same value in a submake. However, the use of srcdir in gcc-c-api/Makefile indicates that the expected value is /a/b/gcc-c-api. Fix this by propagating srcdir explicitly on the submake command line.
1 parent 668fe01 commit dcfd743

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ $(PLUGIN_DSO): $(PLUGIN_OBJECT_FILES) $(LIBGCC_C_API_SO)
149149
-lgcc-c-api -Lgcc-c-api -Wl,-rpath=$(GCCPLUGINS_DIR)
150150

151151
$(LIBGCC_C_API_SO):
152-
cd gcc-c-api && make libgcc-c-api.so CC=$(CC)
152+
cd gcc-c-api && make libgcc-c-api.so CC=$(CC) $(if $(srcdir),srcdir=$(srcdir)./gcc-c-api/)
153153

154154
$(PLUGIN_OBJECT_GENERATED_FILES): CPPFLAGS+= $(if $(srcdir),-I$(srcdir))
155155

0 commit comments

Comments
 (0)