From a17045b02f894e2e4929a4ab42bb0c765883dc2f Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Thu, 14 Apr 2011 16:12:12 -0600 Subject: [PATCH] avoid naming conflicts in OpenJDK build of libavian.a OpenJDK's compile.c and Avian's compile.cpp were both being compiled to compile.o, which led to a conflict when building libavian.a. We now append "-openjdk" to the object file name for OpenJDK code to avoid such conflicts. --- makefile | 4 ++-- openjdk-src.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 367311518f..7356792831 100644 --- a/makefile +++ b/makefile @@ -898,7 +898,7 @@ $(generator): $(generator-objects) @echo "linking $(@)" $(build-ld) $(^) $(build-lflags) -o $(@) -$(openjdk-objects): $(build)/openjdk/%.o: $(openjdk-src)/%.c \ +$(openjdk-objects): $(build)/openjdk/%-openjdk.o: $(openjdk-src)/%.c \ $(openjdk-headers-dep) @echo "compiling $(@)" @mkdir -p $(dir $(@)) @@ -907,7 +907,7 @@ $(openjdk-objects): $(build)/openjdk/%.o: $(openjdk-src)/%.c \ $(optimization-cflags) -w -c $(build)/openjdk/$(notdir $(<)) \ $(call output,$(@)) -$(openjdk-local-objects): $(build)/openjdk/%.o: $(src)/openjdk/%.c \ +$(openjdk-local-objects): $(build)/openjdk/%-openjdk.o: $(src)/openjdk/%.c \ $(openjdk-headers-dep) @echo "compiling $(@)" @mkdir -p $(dir $(@)) diff --git a/openjdk-src.mk b/openjdk-src.mk index 190c8622e9..b050f75c94 100644 --- a/openjdk-src.mk +++ b/openjdk-src.mk @@ -298,7 +298,7 @@ endif openjdk-local-sources = \ $(src)/openjdk/my_net_util.c -c-objects = $(foreach x,$(1),$(patsubst $(2)/%.c,$(3)/%.o,$(x))) +c-objects = $(foreach x,$(1),$(patsubst $(2)/%.c,$(3)/%-openjdk.o,$(x))) openjdk-objects = \ $(call c-objects,$(openjdk-sources),$(openjdk-src),$(build)/openjdk)