diff options
author | Sebastian Kuzminsky <seb@highlab.com> | 2010-03-13 20:21:59 -0700 |
---|---|---|
committer | Sebastian Kuzminsky <seb@highlab.com> | 2010-03-13 20:21:59 -0700 |
commit | a6c55e13a02045cca313647428429a1964af2ef6 (patch) | |
tree | b174e078ffc50b7802cde0eb1d19064b9d44fa41 | |
parent | ac5bbac14f24c7c21dd55db4ea977227bae63dd1 (diff) | |
download | linuxcnc-a6c55e13a02045cca313647428429a1964af2ef6.tar.gz linuxcnc-a6c55e13a02045cca313647428429a1964af2ef6.zip |
Fix some minor linking issues
Many of our binaries are linked by g++, which links in a bunch of C++
libraries by default. But several of those binaries didn't need or want
the C++ libraries, they're just superfluous junk linked in. This commit
changes the makefiles for those binaries to link using gcc instead of g++,
which fixes this problem.
Also, halrmt was linked against readline, but never used it, so I took
that out.
-rw-r--r-- | src/emc/kinematics/Submakefile | 2 | ||||
-rw-r--r-- | src/emc/sai/Submakefile | 2 | ||||
-rw-r--r-- | src/hal/Submakefile | 2 | ||||
-rw-r--r-- | src/hal/components/Submakefile | 4 | ||||
-rw-r--r-- | src/hal/user_comps/Submakefile | 2 | ||||
-rw-r--r-- | src/hal/user_comps/devices/Submakefile | 2 | ||||
-rw-r--r-- | src/hal/utils/Submakefile | 16 | ||||
-rw-r--r-- | src/module_helper/Submakefile | 2 |
8 files changed, 16 insertions, 16 deletions
diff --git a/src/emc/kinematics/Submakefile b/src/emc/kinematics/Submakefile index 841aadefe..fad370e56 100644 --- a/src/emc/kinematics/Submakefile +++ b/src/emc/kinematics/Submakefile @@ -6,7 +6,7 @@ USERSRCS += $(GENSERKINSSRCS) ../bin/genserkins: $(call TOOBJS, $(GENSERKINSSRCS)) ../lib/libemchal.so ../lib/libposemath.so $(ECHO) Linking $(notdir $@) - @$(CXX) $(LDFLAGS) -o $@ $^ + @$(CC) $(LDFLAGS) -o $@ $^ TARGETS += ../bin/genserkins ../include/%.h: ./emc/kinematics/%.h diff --git a/src/emc/sai/Submakefile b/src/emc/sai/Submakefile index ff0fab93d..fe7429287 100644 --- a/src/emc/sai/Submakefile +++ b/src/emc/sai/Submakefile @@ -6,4 +6,4 @@ USERSRCS += $(SAISRCS) $(call TOOBJSDEPS,$(SAISRCS)) : ../bin/rs274: $(call TOOBJS, $(SAISRCS)) ../lib/librs274.so.0 $(ECHO) Linking $(notdir $@) - $(CXX) $(LDFLAGS) -o $@ $^ $(ULFLAGS) + $(CC) $(LDFLAGS) -o $@ $^ $(ULFLAGS) diff --git a/src/hal/Submakefile b/src/hal/Submakefile index d40ab0433..3c16d2094 100644 --- a/src/hal/Submakefile +++ b/src/hal/Submakefile @@ -13,7 +13,7 @@ $(HALLIB).0: $(call TOOBJS, $(HALLIBSRCS)) $(ECHO) Creating shared library $(notdir $@) @mkdir -p ../lib @rm -f $@ - @$(CXX) $(LDFLAGS) -Wl,-soname,$(notdir $@) -shared -o $@ $^ + @$(CC) $(LDFLAGS) -Wl,-soname,$(notdir $@) -shared -o $@ $^ HALMODULESRCS := hal/halmodule.cc PYSRCS += $(HALMODULESRCS) diff --git a/src/hal/components/Submakefile b/src/hal/components/Submakefile index 3597af417..987d5894a 100644 --- a/src/hal/components/Submakefile +++ b/src/hal/components/Submakefile @@ -52,7 +52,7 @@ USERSRCS += $(HALSTREAMERSRCS) ../bin/halstreamer: $(call TOOBJS, $(HALSTREAMERSRCS)) ../lib/libemchal.so.0 $(ECHO) Linking $(notdir $@) - @$(CXX) $(LDFLAGS) -o $@ $^ + @$(CC) $(LDFLAGS) -o $@ $^ TARGETS += ../bin/halstreamer HALSAMPLERSRCS := hal/components/sampler_usr.c @@ -60,7 +60,7 @@ USERSRCS += $(HALSAMPLERSRCS) ../bin/halsampler: $(call TOOBJS, $(HALSAMPLERSRCS)) ../lib/libemchal.so.0 $(ECHO) Linking $(notdir $@) - @$(CXX) $(LDFLAGS) -o $@ $^ + @$(CC) $(LDFLAGS) -o $@ $^ TARGETS += ../bin/halsampler hal/components/conv_float_s32.comp: hal/components/conv.comp.in hal/components/mkconv.sh hal/components/Submakefile diff --git a/src/hal/user_comps/Submakefile b/src/hal/user_comps/Submakefile index 0c311ac21..c5ea7211d 100644 --- a/src/hal/user_comps/Submakefile +++ b/src/hal/user_comps/Submakefile @@ -18,7 +18,7 @@ USERSRCS += $(MODBUSSRCS) ../bin/gs2_vfd: $(call TOOBJS, $(MODBUSSRCS)) ../lib/libemchal.so.0 $(ECHO) Linking $(notdir $@) - @$(CXX) $(LDFLAGS) $(MODBUSLDFLAGS) -o $@ $^ + @$(CC) $(LDFLAGS) $(MODBUSLDFLAGS) -o $@ $^ TARGETS += ../bin/gs2_vfd ../include/%.h: ./hal/user_comps/%.h diff --git a/src/hal/user_comps/devices/Submakefile b/src/hal/user_comps/devices/Submakefile index 67b1951b1..7bad606fc 100644 --- a/src/hal/user_comps/devices/Submakefile +++ b/src/hal/user_comps/devices/Submakefile @@ -5,7 +5,7 @@ USERSRCS += $(HALJSSRCS) ../bin/hal_joystick: $(call TOOBJS, $(HALJSSRCS)) ../lib/libemchal.so.0 $(ECHO) Linking $(notdir $@) - @$(CXX) $(LDFLAGS) -o $@ $^ + @$(CC) $(LDFLAGS) -o $@ $^ TARGETS += ../bin/hal_joystick endif diff --git a/src/hal/utils/Submakefile b/src/hal/utils/Submakefile index 979bfe044..9ee722b9d 100644 --- a/src/hal/utils/Submakefile +++ b/src/hal/utils/Submakefile @@ -10,20 +10,20 @@ $(call TOOBJSDEPS, $(HALSHSRCS)) : EXTRAFLAGS = -fPIC $(call TOOBJSDEPS, hal/utils/halsh.c) : EXTRAFLAGS += $(TCL_CFLAGS) ../tcl/hal.so: $(call TOOBJS, $(HALSHSRCS)) ../lib/libemcini.so.0 ../lib/libemchal.so.0 $(ECHO) Linking $(notdir $@) - $(CXX) $(LDFLAGS) -shared -o $@ $^ + $(CC) $(LDFLAGS) -shared -o $@ $^ TARGETS += ../tcl/hal.so ../bin/halcmd: $(call TOOBJS, $(HALCMDSRCS)) ../lib/libemcini.so.0 ../lib/libemchal.so.0 $(ECHO) Linking $(notdir $@) - $(CXX) $(LDFLAGS) -o $@ $^ $(READLINE_LIBS) + $(CC) $(LDFLAGS) -o $@ $^ $(READLINE_LIBS) TARGETS += ../bin/halcmd HALRMTSRCS := hal/utils/halrmt.c USERSRCS += $(HALRMTSRCS) -../bin/halrmt: $(call TOOBJS, $(HALRMTSRCS)) ../lib/libemchal.so.0 $(READLINE_LIBS) +../bin/halrmt: $(call TOOBJS, $(HALRMTSRCS)) ../lib/libemchal.so.0 $(ECHO) Linking $(notdir $@) - @$(CXX) $(LDFLAGS) -o $@ $^ -lpthread + @$(CC) $(LDFLAGS) -o $@ $^ -lpthread TARGETS += ../bin/halrmt ifneq ($(GTK_VERSION),) @@ -35,7 +35,7 @@ USERSRCS += $(HALMETERSRCS) ../bin/halmeter: $(call TOOBJS, $(HALMETERSRCS)) ../lib/libemchal.so.0 $(ECHO) Linking $(notdir $@) - @$(CXX) $(LDFLAGS) -o $@ $^ $(GTK_LIBS) + @$(CC) $(LDFLAGS) -o $@ $^ $(GTK_LIBS) TARGETS += ../bin/halmeter HALSCOPESRCS := \ @@ -51,7 +51,7 @@ USERSRCS += $(HALSCOPESRCS) ../bin/halscope: $(call TOOBJS, $(HALSCOPESRCS)) ../lib/libemchal.so.0 $(ECHO) Linking $(notdir $@) - @$(CXX) $(LDFLAGS) -o $@ $^ $(GTK_LIBS) + @$(CC) $(LDFLAGS) -o $@ $^ $(GTK_LIBS) TARGETS += ../bin/halscope HALGTKSRCS := \ @@ -72,14 +72,14 @@ PCIWRITESRCS := hal/utils/pci_write.c hal/utils/upci.c USERSRCS += $(PCIWRITESRCS) ../bin/pci_write: $(call TOOBJS, $(PCIWRITESRCS)) $(ECHO) Linking $(notdir $@) - @$(CXX) $(LDFLAGS) -o $@ $^ + @$(CC) $(LDFLAGS) -o $@ $^ TARGETS += ../bin/pci_write PCIREADSRCS := hal/utils/pci_read.c hal/utils/upci.c USERSRCS += $(PCIREADSRCS) ../bin/pci_read: $(call TOOBJS, $(PCIREADSRCS)) $(ECHO) Linking $(notdir $@) - @$(CXX) $(LDFLAGS) -o $@ $^ + @$(CC) $(LDFLAGS) -o $@ $^ TARGETS += ../bin/pci_read endif diff --git a/src/module_helper/Submakefile b/src/module_helper/Submakefile index 8424d9c8c..d34b45797 100644 --- a/src/module_helper/Submakefile +++ b/src/module_helper/Submakefile @@ -11,7 +11,7 @@ endif ../bin/emc_module_helper: $(call TOOBJS, $(MODULE_HELPERSRCS)) $(ECHO) Linking $(notdir $@) - @$(CXX) -o $@ $^ + @$(CC) -o $@ $^ TARGETS += ../bin/emc_module_helper endif |