diff options
| author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-07-16 03:12:21 -0400 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2014-07-16 11:15:26 -0400 |
| commit | 62e2210798ed38928ab24841e8b4878a2c170af8 (patch) | |
| tree | 23356ee708bad36cc7a6a9775f9b25986e33b640 /scripts | |
| parent | edb950c17de09ed04be1ed2c451ba207e3b0a29b (diff) | |
kbuild: drop shared library support from Makefile.host
The shared library feature in Makefile.host is no longer used.
Rip it off to keep the build infrastucture simple.
Update Documentation/kbuild/makefiles.txt too.
The section "4.3 Definition shared libraries" should be removed
and the following sections should be re-numbered.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.host | 43 |
1 files changed, 3 insertions, 40 deletions
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index bf44e7988bf4..1c2e57000f5a 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host | |||
| @@ -20,16 +20,6 @@ | |||
| 20 | # Will compile qconf as a C++ program, and menu as a C program. | 20 | # Will compile qconf as a C++ program, and menu as a C program. |
| 21 | # They are linked as C++ code to the executable qconf | 21 | # They are linked as C++ code to the executable qconf |
| 22 | 22 | ||
| 23 | # hostprogs-y := conf | ||
| 24 | # conf-objs := conf.o libkconfig.so | ||
| 25 | # libkconfig-objs := expr.o type.o | ||
| 26 | # Will create a shared library named libkconfig.so that consists of | ||
| 27 | # expr.o and type.o (they are both compiled as C code and the object files | ||
| 28 | # are made as position independent code). | ||
| 29 | # conf.c is compiled as a C program, and conf.o is linked together with | ||
| 30 | # libkconfig.so as the executable conf. | ||
| 31 | # Note: Shared libraries consisting of C++ files are not supported | ||
| 32 | |||
| 33 | __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) | 23 | __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) |
| 34 | 24 | ||
| 35 | # C code | 25 | # C code |
| @@ -52,15 +42,6 @@ host-cxxmulti := $(foreach m,$(__hostprogs),$(if $($(m)-cxxobjs),$(m))) | |||
| 52 | # C++ Object (.o) files compiled from .cc files | 42 | # C++ Object (.o) files compiled from .cc files |
| 53 | host-cxxobjs := $(sort $(foreach m,$(host-cxxmulti),$($(m)-cxxobjs))) | 43 | host-cxxobjs := $(sort $(foreach m,$(host-cxxmulti),$($(m)-cxxobjs))) |
| 54 | 44 | ||
| 55 | # Shared libaries (only .c supported) | ||
| 56 | # Shared libraries (.so) - all .so files referenced in "xxx-objs" | ||
| 57 | host-cshlib := $(sort $(filter %.so, $(host-cobjs))) | ||
| 58 | # Remove .so files from "xxx-objs" | ||
| 59 | host-cobjs := $(filter-out %.so,$(host-cobjs)) | ||
| 60 | |||
| 61 | #Object (.o) files used by the shared libaries | ||
| 62 | host-cshobjs := $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs)))) | ||
| 63 | |||
| 64 | # output directory for programs/.o files | 45 | # output directory for programs/.o files |
| 65 | # hostprogs-y := tools/build may have been specified. Retrieve directory | 46 | # hostprogs-y := tools/build may have been specified. Retrieve directory |
| 66 | host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) | 47 | host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) |
| @@ -82,8 +63,6 @@ host-cmulti := $(addprefix $(obj)/,$(host-cmulti)) | |||
| 82 | host-cobjs := $(addprefix $(obj)/,$(host-cobjs)) | 63 | host-cobjs := $(addprefix $(obj)/,$(host-cobjs)) |
| 83 | host-cxxmulti := $(addprefix $(obj)/,$(host-cxxmulti)) | 64 | host-cxxmulti := $(addprefix $(obj)/,$(host-cxxmulti)) |
| 84 | host-cxxobjs := $(addprefix $(obj)/,$(host-cxxobjs)) | 65 | host-cxxobjs := $(addprefix $(obj)/,$(host-cxxobjs)) |
| 85 | host-cshlib := $(addprefix $(obj)/,$(host-cshlib)) | ||
| 86 | host-cshobjs := $(addprefix $(obj)/,$(host-cshobjs)) | ||
| 87 | host-objdirs := $(addprefix $(obj)/,$(host-objdirs)) | 66 | host-objdirs := $(addprefix $(obj)/,$(host-objdirs)) |
| 88 | 67 | ||
| 89 | obj-dirs += $(host-objdirs) | 68 | obj-dirs += $(host-objdirs) |
| @@ -124,7 +103,7 @@ quiet_cmd_host-cmulti = HOSTLD $@ | |||
| 124 | cmd_host-cmulti = $(HOSTCC) $(HOSTLDFLAGS) -o $@ \ | 103 | cmd_host-cmulti = $(HOSTCC) $(HOSTLDFLAGS) -o $@ \ |
| 125 | $(addprefix $(obj)/,$($(@F)-objs)) \ | 104 | $(addprefix $(obj)/,$($(@F)-objs)) \ |
| 126 | $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) | 105 | $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) |
| 127 | $(host-cmulti): $(obj)/%: $(host-cobjs) $(host-cshlib) FORCE | 106 | $(host-cmulti): $(obj)/%: $(host-cobjs) FORCE |
| 128 | $(call if_changed,host-cmulti) | 107 | $(call if_changed,host-cmulti) |
| 129 | 108 | ||
| 130 | # Create .o file from a single .c file | 109 | # Create .o file from a single .c file |
| @@ -141,7 +120,7 @@ quiet_cmd_host-cxxmulti = HOSTLD $@ | |||
| 141 | $(foreach o,objs cxxobjs,\ | 120 | $(foreach o,objs cxxobjs,\ |
| 142 | $(addprefix $(obj)/,$($(@F)-$(o)))) \ | 121 | $(addprefix $(obj)/,$($(@F)-$(o)))) \ |
| 143 | $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) | 122 | $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) |
| 144 | $(host-cxxmulti): $(obj)/%: $(host-cobjs) $(host-cxxobjs) $(host-cshlib) FORCE | 123 | $(host-cxxmulti): $(obj)/%: $(host-cobjs) $(host-cxxobjs) FORCE |
| 145 | $(call if_changed,host-cxxmulti) | 124 | $(call if_changed,host-cxxmulti) |
| 146 | 125 | ||
| 147 | # Create .o file from a single .cc (C++) file | 126 | # Create .o file from a single .cc (C++) file |
| @@ -150,21 +129,5 @@ quiet_cmd_host-cxxobjs = HOSTCXX $@ | |||
| 150 | $(host-cxxobjs): $(obj)/%.o: $(src)/%.cc FORCE | 129 | $(host-cxxobjs): $(obj)/%.o: $(src)/%.cc FORCE |
| 151 | $(call if_changed_dep,host-cxxobjs) | 130 | $(call if_changed_dep,host-cxxobjs) |
| 152 | 131 | ||
| 153 | # Compile .c file, create position independent .o file | ||
| 154 | # host-cshobjs -> .o | ||
| 155 | quiet_cmd_host-cshobjs = HOSTCC -fPIC $@ | ||
| 156 | cmd_host-cshobjs = $(HOSTCC) $(hostc_flags) -fPIC -c -o $@ $< | ||
| 157 | $(host-cshobjs): $(obj)/%.o: $(src)/%.c FORCE | ||
| 158 | $(call if_changed_dep,host-cshobjs) | ||
| 159 | |||
| 160 | # Link a shared library, based on position independent .o files | ||
| 161 | # *.o -> .so shared library (host-cshlib) | ||
| 162 | quiet_cmd_host-cshlib = HOSTLLD -shared $@ | ||
| 163 | cmd_host-cshlib = $(HOSTCC) $(HOSTLDFLAGS) -shared -o $@ \ | ||
| 164 | $(addprefix $(obj)/,$($(@F:.so=-objs))) \ | ||
| 165 | $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) | ||
| 166 | $(host-cshlib): $(obj)/%: $(host-cshobjs) FORCE | ||
| 167 | $(call if_changed,host-cshlib) | ||
| 168 | |||
| 169 | targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ | 132 | targets += $(host-csingle) $(host-cmulti) $(host-cobjs)\ |
| 170 | $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) | 133 | $(host-cxxmulti) $(host-cxxobjs) |
