* [PATCH] Install libm.a as linker script [BZ #20539]
@ 2016-10-20 19:21 Andrew Senkevich
2016-10-24 22:02 ` H.J. Lu
0 siblings, 1 reply; 26+ messages in thread
From: Andrew Senkevich @ 2016-10-20 19:21 UTC (permalink / raw)
To: libc-alpha
Hi,
to avoid static link fail w/o passing additional -lmvec option (while
building with GCC 6.1 and above) this patch makes libm.a installed as
linker script.
Tested on x86_64. Ok for trunk?
2016-10-20 Andrew Senkevich <andrew.senkevich@intel.com>
[BZ #20539]
* Makerules (install-lib.a): filter out libm.a in case of libmvec build.
* math/Makefile: added rules for libm.a installation as linker script.
diff --git a/Makerules b/Makerules
index e865782..290f927 100644
--- a/Makerules
+++ b/Makerules
@@ -1190,7 +1190,9 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
$(do-install-program)
endif
ifdef install-lib
-install-lib.a := $(filter lib%.a,$(install-lib))
+ifeq ($(build-mathvec),yes)
+install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
+endif
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
ifdef install-lib-non.a
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
diff --git a/math/Makefile b/math/Makefile
index 2aa6a34..a96ef30 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -128,8 +128,8 @@ generated += $(foreach s,.c .S,$(call
type-foreach, $(calls:s_%=m_%$(s))))
routines = $(call type-foreach, $(calls))
ifeq ($(build-mathvec),yes)
-# We need to install libm.so as linker script
-# for more comfortable use of vector math library.
+# We need to install libm.so and libm.a as linker scripts
+# for transparent use of vector math library.
install-lib-ldscripts := libm.so
install_subdir: $(inst_libdir)/libm.so
$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
@@ -142,6 +142,19 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
'AS_NEEDED ( $(libdir)/libmvec_nonshared.a
$(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
) > $@.new
mv -f $@.new $@
+
+install-others = $(inst_libdir)/libm.a
+$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
+ $(libm) \
+ $(libmvec) \
+ $(+force)
+ (echo '/* GNU ld script'; echo '*/';\
+ cat $<; \
+ echo 'GROUP ( $(libdir)/libm-$(lib-version).a ' \
+ 'AS_NEEDED ( $(libdir)/libmvec.a) )' \
+ ) > $@.new
+ cp $(objpfx)libm.a $(libdir)/libm-$(lib-version).a
+ mv -f $@.new $@
endif
# Rules for the test suite.
--
WBR,
Andrew
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-10-20 19:21 [PATCH] Install libm.a as linker script [BZ #20539] Andrew Senkevich
@ 2016-10-24 22:02 ` H.J. Lu
2016-11-14 19:16 ` Andrew Senkevich
2016-12-05 19:40 ` Andrew Senkevich
0 siblings, 2 replies; 26+ messages in thread
From: H.J. Lu @ 2016-10-24 22:02 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: libc-alpha
On Thu, Oct 20, 2016 at 12:20 PM, Andrew Senkevich
<andrew.n.senkevich@gmail.com> wrote:
> Hi,
>
> to avoid static link fail w/o passing additional -lmvec option (while
> building with GCC 6.1 and above) this patch makes libm.a installed as
> linker script.
> Tested on x86_64. Ok for trunk?
A couple issues. Don't use cut/paste since it adds some newlines
and the patch won't apply.
> 2016-10-20 Andrew Senkevich <andrew.senkevich@intel.com>
>
> [BZ #20539]
> * Makerules (install-lib.a): filter out libm.a in case of libmvec build.
> * math/Makefile: added rules for libm.a installation as linker script.
>
> diff --git a/Makerules b/Makerules
> index e865782..290f927 100644
> --- a/Makerules
> +++ b/Makerules
> @@ -1190,7 +1190,9 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
> $(do-install-program)
> endif
> ifdef install-lib
> -install-lib.a := $(filter lib%.a,$(install-lib))
> +ifeq ($(build-mathvec),yes)
> +install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
> +endif
Should we use $(install-lib-ldscripts) instead of libm.a here?
> install-lib-non.a := $(filter-out lib%.a,$(install-lib))
> ifdef install-lib-non.a
> $(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
> diff --git a/math/Makefile b/math/Makefile
> index 2aa6a34..a96ef30 100644
> --- a/math/Makefile
> +++ b/math/Makefile
> @@ -128,8 +128,8 @@ generated += $(foreach s,.c .S,$(call
> type-foreach, $(calls:s_%=m_%$(s))))
> routines = $(call type-foreach, $(calls))
>
> ifeq ($(build-mathvec),yes)
> -# We need to install libm.so as linker script
> -# for more comfortable use of vector math library.
> +# We need to install libm.so and libm.a as linker scripts
> +# for transparent use of vector math library.
> install-lib-ldscripts := libm.so
> install_subdir: $(inst_libdir)/libm.so
> $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
> @@ -142,6 +142,19 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
> 'AS_NEEDED ( $(libdir)/libmvec_nonshared.a
> $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
> ) > $@.new
> mv -f $@.new $@
> +
> +install-others = $(inst_libdir)/libm.a
> +$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
> + $(libm) \
> + $(libmvec) \
> + $(+force)
> + (echo '/* GNU ld script'; echo '*/';\
> + cat $<; \
> + echo 'GROUP ( $(libdir)/libm-$(lib-version).a ' \
> + 'AS_NEEDED ( $(libdir)/libmvec.a) )' \
^^^^^^^^^^^^^ Remove it.
> + ) > $@.new
> + cp $(objpfx)libm.a $(libdir)/libm-$(lib-version).a
^^^^^ It should be inst_libdir.
> + mv -f $@.new $@
> endif
>
> # Rules for the test suite.
>
Do you need to update rules for building static math tests with
libmvec.a?
--
H.J.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-10-24 22:02 ` H.J. Lu
@ 2016-11-14 19:16 ` Andrew Senkevich
2016-11-14 19:22 ` H.J. Lu
2016-12-05 19:40 ` Andrew Senkevich
1 sibling, 1 reply; 26+ messages in thread
From: Andrew Senkevich @ 2016-11-14 19:16 UTC (permalink / raw)
To: H.J. Lu; +Cc: libc-alpha
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
2016-10-25 1:02 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
>> diff --git a/Makerules b/Makerules
>> index e865782..290f927 100644
>> --- a/Makerules
>> +++ b/Makerules
>> @@ -1190,7 +1190,9 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
>> $(do-install-program)
>> endif
>> ifdef install-lib
>> -install-lib.a := $(filter lib%.a,$(install-lib))
>> +ifeq ($(build-mathvec),yes)
>> +install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
>> +endif
>
> Should we use $(install-lib-ldscripts) instead of libm.a here?
I had tried but haven't rich a success.
>> # Rules for the test suite.
>>
>
> Do you need to update rules for building static math tests with
> libmvec.a?
I haven't added -lmvec explicitly for any static math test so I think no.
Attached corrected version.
--
WBR,
Andrew
[-- Attachment #2: bz20539.patch --]
[-- Type: application/octet-stream, Size: 1767 bytes --]
diff --git a/Makerules b/Makerules
index e865782..290f927 100644
--- a/Makerules
+++ b/Makerules
@@ -1190,7 +1190,9 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
$(do-install-program)
endif
ifdef install-lib
-install-lib.a := $(filter lib%.a,$(install-lib))
+ifeq ($(build-mathvec),yes)
+install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
+endif
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
ifdef install-lib-non.a
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
diff --git a/math/Makefile b/math/Makefile
index f400d7b..39a34b9 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -128,8 +128,8 @@ generated += $(foreach s,.c .S,$(call type-foreach, $(calls:s_%=m_%$(s))))
routines = $(call type-foreach, $(calls))
ifeq ($(build-mathvec),yes)
-# We need to install libm.so as linker script
-# for more comfortable use of vector math library.
+# We need to install libm.so and libm.a as linker scripts
+# for transparent use of vector math library.
install-lib-ldscripts := libm.so
install_subdir: $(inst_libdir)/libm.so
$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
@@ -142,6 +142,18 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
'AS_NEEDED ( $(libdir)/libmvec_nonshared.a $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
) > $@.new
mv -f $@.new $@
+
+install-others = $(inst_libdir)/libm.a
+$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
+ $(libm) \
+ $(libmvec) \
+ $(+force)
+ (echo '/* GNU ld script'; echo '*/';\
+ cat $<; \
+ echo 'GROUP ( $(inst_libdir)/libm-$(lib-version).a $(inst_libdir)/libmvec.a )' \
+ ) > $@.new
+ cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
+ mv -f $@.new $@
endif
# Rules for the test suite.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-11-14 19:16 ` Andrew Senkevich
@ 2016-11-14 19:22 ` H.J. Lu
0 siblings, 0 replies; 26+ messages in thread
From: H.J. Lu @ 2016-11-14 19:22 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: libc-alpha
On Mon, Nov 14, 2016 at 11:15 AM, Andrew Senkevich
<andrew.n.senkevich@gmail.com> wrote:
> 2016-10-25 1:02 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
>>> diff --git a/Makerules b/Makerules
>>> index e865782..290f927 100644
>>> --- a/Makerules
>>> +++ b/Makerules
>>> @@ -1190,7 +1190,9 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
>>> $(do-install-program)
>>> endif
>>> ifdef install-lib
>>> -install-lib.a := $(filter lib%.a,$(install-lib))
>>> +ifeq ($(build-mathvec),yes)
>>> +install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
>>> +endif
>>
>> Should we use $(install-lib-ldscripts) instead of libm.a here?
>
> I had tried but haven't rich a success.
Did you add libm.a to install-lib-ldscripts?
>>> # Rules for the test suite.
>>>
>>
>> Do you need to update rules for building static math tests with
>> libmvec.a?
>
> I haven't added -lmvec explicitly for any static math test so I think no.
Static math test in glibc may fail if the same bug is triggered
with ether new GCC or new test.
> Attached corrected version.
>
echo 'GROUP ( $(inst_libdir)/libm-$(lib-version).a $(inst_libdir)/libmvec.a )' \
^^^^^^^^^^^^ Please use libdir here.
--
H.J.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-10-24 22:02 ` H.J. Lu
2016-11-14 19:16 ` Andrew Senkevich
@ 2016-12-05 19:40 ` Andrew Senkevich
2016-12-05 20:01 ` H.J. Lu
1 sibling, 1 reply; 26+ messages in thread
From: Andrew Senkevich @ 2016-12-05 19:40 UTC (permalink / raw)
To: H.J. Lu; +Cc: libc-alpha
[-- Attachment #1: Type: text/plain, Size: 2218 bytes --]
2016-10-25 1:02 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
. . .
>
> Do you need to update rules for building static math tests with
> libmvec.a?
Currently where are no static tests linked with libmvec.
Should we add such tests?
Current patch is:
diff --git a/Makerules b/Makerules
index e865782..a670f81 100644
--- a/Makerules
+++ b/Makerules
@@ -1190,7 +1190,10 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
$(do-install-program)
endif
ifdef install-lib
-install-lib.a := $(filter lib%.a,$(install-lib))
+ifeq ($(build-mathvec),yes)
+install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
+install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
+endif
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
ifdef install-lib-non.a
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
diff --git a/math/Makefile b/math/Makefile
index 848b093..77031b1 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -128,10 +128,10 @@ generated += $(foreach s,.c .S,$(call
type-foreach, $(calls:s_%=m_%$(s))))
routines = $(call type-foreach, $(calls))
ifeq ($(build-mathvec),yes)
-# We need to install libm.so as linker script
-# for more comfortable use of vector math library.
-install-lib-ldscripts := libm.so
-install_subdir: $(inst_libdir)/libm.so
+# We need to install libm.so and libm.a as linker scripts
+# for transparent use of vector math library.
+install-lib-ldscripts := libm.so libm.a
+install-others: $(inst_libdir)/libm.so $(inst_libdir)/libm.a
$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
$(libm) \
$(libmvec) \
@@ -142,6 +142,18 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
'AS_NEEDED ( $(libdir)/libmvec_nonshared.a
$(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
) > $@.new
mv -f $@.new $@
+
+install-others = $(inst_libdir)/libm.a
+$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
+ $(libm) \
+ $(libmvec) \
+ $(+force)
+ (echo '/* GNU ld script'; echo '*/';\
+ cat $<; \
+ echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
+ ) > $@.new
+ cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
+ mv -f $@.new $@
endif
# Rules for the test suite.
--
WBR,
Andrew
[-- Attachment #2: bz20539_v4.patch --]
[-- Type: application/octet-stream, Size: 1968 bytes --]
diff --git a/Makerules b/Makerules
index e865782..a670f81 100644
--- a/Makerules
+++ b/Makerules
@@ -1190,7 +1190,10 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
$(do-install-program)
endif
ifdef install-lib
-install-lib.a := $(filter lib%.a,$(install-lib))
+ifeq ($(build-mathvec),yes)
+install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
+install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
+endif
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
ifdef install-lib-non.a
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
diff --git a/math/Makefile b/math/Makefile
index 848b093..77031b1 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -128,10 +128,10 @@ generated += $(foreach s,.c .S,$(call type-foreach, $(calls:s_%=m_%$(s))))
routines = $(call type-foreach, $(calls))
ifeq ($(build-mathvec),yes)
-# We need to install libm.so as linker script
-# for more comfortable use of vector math library.
-install-lib-ldscripts := libm.so
-install_subdir: $(inst_libdir)/libm.so
+# We need to install libm.so and libm.a as linker scripts
+# for transparent use of vector math library.
+install-lib-ldscripts := libm.so libm.a
+install-others: $(inst_libdir)/libm.so $(inst_libdir)/libm.a
$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
$(libm) \
$(libmvec) \
@@ -142,6 +142,18 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
'AS_NEEDED ( $(libdir)/libmvec_nonshared.a $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
) > $@.new
mv -f $@.new $@
+
+install-others = $(inst_libdir)/libm.a
+$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
+ $(libm) \
+ $(libmvec) \
+ $(+force)
+ (echo '/* GNU ld script'; echo '*/';\
+ cat $<; \
+ echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
+ ) > $@.new
+ cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
+ mv -f $@.new $@
endif
# Rules for the test suite.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-05 19:40 ` Andrew Senkevich
@ 2016-12-05 20:01 ` H.J. Lu
2016-12-06 12:17 ` Andrew Senkevich
0 siblings, 1 reply; 26+ messages in thread
From: H.J. Lu @ 2016-12-05 20:01 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: libc-alpha
On Mon, Dec 5, 2016 at 11:39 AM, Andrew Senkevich
<andrew.n.senkevich@gmail.com> wrote:
> 2016-10-25 1:02 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
> . . .
>>
>> Do you need to update rules for building static math tests with
>> libmvec.a?
>
> Currently where are no static tests linked with libmvec.
> Should we add such tests?
It is probably OK without it for now.
> Current patch is:
>
> diff --git a/Makerules b/Makerules
> index e865782..a670f81 100644
> --- a/Makerules
> +++ b/Makerules
> @@ -1190,7 +1190,10 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
> $(do-install-program)
> endif
> ifdef install-lib
> -install-lib.a := $(filter lib%.a,$(install-lib))
> +ifeq ($(build-mathvec),yes)
> +install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
> +install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
> +endif
Will just
++ b/Makerules
@@ -1191,6 +1191,7 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
endif
ifdef install-lib
install-lib.a := $(filter lib%.a,$(install-lib))
+install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
ifdef install-lib-non.a
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
work?
> install-lib-non.a := $(filter-out lib%.a,$(install-lib))
> ifdef install-lib-non.a
> $(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
> diff --git a/math/Makefile b/math/Makefile
> index 848b093..77031b1 100644
> --- a/math/Makefile
> +++ b/math/Makefile
> @@ -128,10 +128,10 @@ generated += $(foreach s,.c .S,$(call
> type-foreach, $(calls:s_%=m_%$(s))))
> routines = $(call type-foreach, $(calls))
>
> ifeq ($(build-mathvec),yes)
> -# We need to install libm.so as linker script
> -# for more comfortable use of vector math library.
> -install-lib-ldscripts := libm.so
> -install_subdir: $(inst_libdir)/libm.so
> +# We need to install libm.so and libm.a as linker scripts
> +# for transparent use of vector math library.
> +install-lib-ldscripts := libm.so libm.a
> +install-others: $(inst_libdir)/libm.so $(inst_libdir)/libm.a
> $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
> $(libm) \
> $(libmvec) \
> @@ -142,6 +142,18 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
> 'AS_NEEDED ( $(libdir)/libmvec_nonshared.a
> $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
> ) > $@.new
> mv -f $@.new $@
> +
> +install-others = $(inst_libdir)/libm.a
> +$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
> + $(libm) \
> + $(libmvec) \
> + $(+force)
> + (echo '/* GNU ld script'; echo '*/';\
> + cat $<; \
> + echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
> + ) > $@.new
> + cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
> + mv -f $@.new $@
> endif
>
> # Rules for the test suite.
>
>
> --
> WBR,
> Andrew
--
H.J.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-05 20:01 ` H.J. Lu
@ 2016-12-06 12:17 ` Andrew Senkevich
2016-12-06 14:17 ` Andreas Schwab
0 siblings, 1 reply; 26+ messages in thread
From: Andrew Senkevich @ 2016-12-06 12:17 UTC (permalink / raw)
To: H.J. Lu, libc-alpha
[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]
2016-12-05 23:01 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
> On Mon, Dec 5, 2016 at 11:39 AM, Andrew Senkevich
> <andrew.n.senkevich@gmail.com> wrote:
>> 2016-10-25 1:02 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
>> . . .
>>>
>>> Do you need to update rules for building static math tests with
>>> libmvec.a?
>>
>> Currently where are no static tests linked with libmvec.
>> Should we add such tests?
>
> It is probably OK without it for now.
>
>> Current patch is:
>>
>> diff --git a/Makerules b/Makerules
>> index e865782..a670f81 100644
>> --- a/Makerules
>> +++ b/Makerules
>> @@ -1190,7 +1190,10 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
>> $(do-install-program)
>> endif
>> ifdef install-lib
>> -install-lib.a := $(filter lib%.a,$(install-lib))
>> +ifeq ($(build-mathvec),yes)
>> +install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
>> +install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
>> +endif
>
> Will just
>
> ++ b/Makerules
> @@ -1191,6 +1191,7 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
> endif
> ifdef install-lib
> install-lib.a := $(filter lib%.a,$(install-lib))
> +install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
> install-lib-non.a := $(filter-out lib%.a,$(install-lib))
> ifdef install-lib-non.a
> $(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
>
> work?
Yes, indeed.
Attached fixed with updated ChangeLog, Ok for trunk?
--
WBR,
Andrew
[-- Attachment #2: bz20539.patch --]
[-- Type: application/octet-stream, Size: 2387 bytes --]
diff --git a/ChangeLog b/ChangeLog
index ab723eb..8e4f6ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-12-06 Andrew Senkevich <andrew.senkevich@intel.com>
+
+ [BZ #20539]
+ * math/Makefile (install-lib-ldscripts): added libm.a.
+ ($(inst_libdir)/libm.a): added rule for installation as linker script.
+ * Makerules (install-lib.a): filter out install-lib-ldscripts.
+
2016-12-06 Joseph Myers <joseph@codesourcery.com>
[BZ #20916]
diff --git a/Makerules b/Makerules
index e865782..573c074 100644
--- a/Makerules
+++ b/Makerules
@@ -1190,7 +1190,8 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
$(do-install-program)
endif
ifdef install-lib
-install-lib.a := $(filter lib%.a,$(install-lib))
+install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
+install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
ifdef install-lib-non.a
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
diff --git a/math/Makefile b/math/Makefile
index 848b093..77031b1 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -128,10 +128,10 @@ generated += $(foreach s,.c .S,$(call type-foreach, $(calls:s_%=m_%$(s))))
routines = $(call type-foreach, $(calls))
ifeq ($(build-mathvec),yes)
-# We need to install libm.so as linker script
-# for more comfortable use of vector math library.
-install-lib-ldscripts := libm.so
-install_subdir: $(inst_libdir)/libm.so
+# We need to install libm.so and libm.a as linker scripts
+# for transparent use of vector math library.
+install-lib-ldscripts := libm.so libm.a
+install-others: $(inst_libdir)/libm.so $(inst_libdir)/libm.a
$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
$(libm) \
$(libmvec) \
@@ -142,6 +142,18 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
'AS_NEEDED ( $(libdir)/libmvec_nonshared.a $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
) > $@.new
mv -f $@.new $@
+
+install-others = $(inst_libdir)/libm.a
+$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
+ $(libm) \
+ $(libmvec) \
+ $(+force)
+ (echo '/* GNU ld script'; echo '*/';\
+ cat $<; \
+ echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
+ ) > $@.new
+ cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
+ mv -f $@.new $@
endif
# Rules for the test suite.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-06 12:17 ` Andrew Senkevich
@ 2016-12-06 14:17 ` Andreas Schwab
2016-12-06 14:49 ` Andrew Senkevich
0 siblings, 1 reply; 26+ messages in thread
From: Andreas Schwab @ 2016-12-06 14:17 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: H.J. Lu, libc-alpha
On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
> +2016-12-06 Andrew Senkevich <andrew.senkevich@intel.com>
> +
> + [BZ #20539]
> + * math/Makefile (install-lib-ldscripts): added libm.a.
> + ($(inst_libdir)/libm.a): added rule for installation as linker script.
> + * Makerules (install-lib.a): filter out install-lib-ldscripts.
ChangeLog entries should be in present tense, and written as full
sentences.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-06 14:17 ` Andreas Schwab
@ 2016-12-06 14:49 ` Andrew Senkevich
2016-12-06 15:21 ` Andreas Schwab
0 siblings, 1 reply; 26+ messages in thread
From: Andrew Senkevich @ 2016-12-06 14:49 UTC (permalink / raw)
To: Andreas Schwab; +Cc: H.J. Lu, libc-alpha
2016-12-06 17:17 GMT+03:00 Andreas Schwab <schwab@suse.de>:
> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>
>> +2016-12-06 Andrew Senkevich <andrew.senkevich@intel.com>
>> +
>> + [BZ #20539]
>> + * math/Makefile (install-lib-ldscripts): added libm.a.
>> + ($(inst_libdir)/libm.a): added rule for installation as linker script.
>> + * Makerules (install-lib.a): filter out install-lib-ldscripts.
>
> ChangeLog entries should be in present tense, and written as full
> sentences.
Which sentence is not full?
--
WBR,
Andrew
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-06 14:49 ` Andrew Senkevich
@ 2016-12-06 15:21 ` Andreas Schwab
2016-12-06 15:50 ` Andrew Senkevich
0 siblings, 1 reply; 26+ messages in thread
From: Andreas Schwab @ 2016-12-06 15:21 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: H.J. Lu, libc-alpha
On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
> 2016-12-06 17:17 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>
>>> +2016-12-06 Andrew Senkevich <andrew.senkevich@intel.com>
>>> +
>>> + [BZ #20539]
>>> + * math/Makefile (install-lib-ldscripts): added libm.a.
>>> + ($(inst_libdir)/libm.a): added rule for installation as linker script.
>>> + * Makerules (install-lib.a): filter out install-lib-ldscripts.
>>
>> ChangeLog entries should be in present tense, and written as full
>> sentences.
>
> Which sentence is not full?
Full sentences start with a capital.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-06 15:21 ` Andreas Schwab
@ 2016-12-06 15:50 ` Andrew Senkevich
2016-12-06 21:49 ` H.J. Lu
0 siblings, 1 reply; 26+ messages in thread
From: Andrew Senkevich @ 2016-12-06 15:50 UTC (permalink / raw)
To: Andreas Schwab; +Cc: H.J. Lu, libc-alpha
[-- Attachment #1: Type: text/plain, Size: 801 bytes --]
2016-12-06 18:21 GMT+03:00 Andreas Schwab <schwab@suse.de>:
> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>
>> 2016-12-06 17:17 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>
>>>> +2016-12-06 Andrew Senkevich <andrew.senkevich@intel.com>
>>>> +
>>>> + [BZ #20539]
>>>> + * math/Makefile (install-lib-ldscripts): added libm.a.
>>>> + ($(inst_libdir)/libm.a): added rule for installation as linker script.
>>>> + * Makerules (install-lib.a): filter out install-lib-ldscripts.
>>>
>>> ChangeLog entries should be in present tense, and written as full
>>> sentences.
>>
>> Which sentence is not full?
>
> Full sentences start with a capital.
Oh yes of course, fixed.
--
WBR,
Andrew
[-- Attachment #2: bz20539.patch --]
[-- Type: application/octet-stream, Size: 2383 bytes --]
diff --git a/ChangeLog b/ChangeLog
index ab723eb..4f90a70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-12-06 Andrew Senkevich <andrew.senkevich@intel.com>
+
+ [BZ #20539]
+ * math/Makefile (install-lib-ldscripts): Add libm.a.
+ ($(inst_libdir)/libm.a): Add rule for installation as linker script.
+ * Makerules (install-lib.a): Filter out install-lib-ldscripts.
+
2016-12-06 Joseph Myers <joseph@codesourcery.com>
[BZ #20916]
diff --git a/Makerules b/Makerules
index e865782..573c074 100644
--- a/Makerules
+++ b/Makerules
@@ -1190,7 +1190,8 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
$(do-install-program)
endif
ifdef install-lib
-install-lib.a := $(filter lib%.a,$(install-lib))
+install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
+install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
ifdef install-lib-non.a
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
diff --git a/math/Makefile b/math/Makefile
index 848b093..77031b1 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -128,10 +128,10 @@ generated += $(foreach s,.c .S,$(call type-foreach, $(calls:s_%=m_%$(s))))
routines = $(call type-foreach, $(calls))
ifeq ($(build-mathvec),yes)
-# We need to install libm.so as linker script
-# for more comfortable use of vector math library.
-install-lib-ldscripts := libm.so
-install_subdir: $(inst_libdir)/libm.so
+# We need to install libm.so and libm.a as linker scripts
+# for transparent use of vector math library.
+install-lib-ldscripts := libm.so libm.a
+install-others: $(inst_libdir)/libm.so $(inst_libdir)/libm.a
$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
$(libm) \
$(libmvec) \
@@ -142,6 +142,18 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
'AS_NEEDED ( $(libdir)/libmvec_nonshared.a $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
) > $@.new
mv -f $@.new $@
+
+install-others = $(inst_libdir)/libm.a
+$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
+ $(libm) \
+ $(libmvec) \
+ $(+force)
+ (echo '/* GNU ld script'; echo '*/';\
+ cat $<; \
+ echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
+ ) > $@.new
+ cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
+ mv -f $@.new $@
endif
# Rules for the test suite.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-06 15:50 ` Andrew Senkevich
@ 2016-12-06 21:49 ` H.J. Lu
2016-12-07 10:34 ` Andrew Senkevich
0 siblings, 1 reply; 26+ messages in thread
From: H.J. Lu @ 2016-12-06 21:49 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: Andreas Schwab, libc-alpha
On Tue, Dec 6, 2016 at 7:49 AM, Andrew Senkevich
<andrew.n.senkevich@gmail.com> wrote:
> 2016-12-06 18:21 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>
>>> 2016-12-06 17:17 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>>
>>>>> +2016-12-06 Andrew Senkevich <andrew.senkevich@intel.com>
>>>>> +
>>>>> + [BZ #20539]
>>>>> + * math/Makefile (install-lib-ldscripts): added libm.a.
>>>>> + ($(inst_libdir)/libm.a): added rule for installation as linker script.
>>>>> + * Makerules (install-lib.a): filter out install-lib-ldscripts.
>>>>
>>>> ChangeLog entries should be in present tense, and written as full
>>>> sentences.
>>>
>>> Which sentence is not full?
>>
>> Full sentences start with a capital.
>
> Oh yes of course, fixed.
>
>
> --
> WBR,
> Andrew
diff --git a/Makerules b/Makerules
index e865782..573c074 100644
--- a/Makerules
+++ b/Makerules
@@ -1190,7 +1190,8 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
$(do-install-program)
endif
ifdef install-lib
-install-lib.a := $(filter lib%.a,$(install-lib))
+install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
+install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
Need to filler out libm.a separately since it is in install-lib-ldscripts
already.
--
H.J.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-06 21:49 ` H.J. Lu
@ 2016-12-07 10:34 ` Andrew Senkevich
2016-12-07 16:22 ` H.J. Lu
0 siblings, 1 reply; 26+ messages in thread
From: Andrew Senkevich @ 2016-12-07 10:34 UTC (permalink / raw)
To: H.J. Lu; +Cc: Andreas Schwab, libc-alpha
[-- Attachment #1: Type: text/plain, Size: 1571 bytes --]
2016-12-07 0:48 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
> On Tue, Dec 6, 2016 at 7:49 AM, Andrew Senkevich
> <andrew.n.senkevich@gmail.com> wrote:
>> 2016-12-06 18:21 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>
>>>> 2016-12-06 17:17 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>>>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>>>
>>>>>> +2016-12-06 Andrew Senkevich <andrew.senkevich@intel.com>
>>>>>> +
>>>>>> + [BZ #20539]
>>>>>> + * math/Makefile (install-lib-ldscripts): added libm.a.
>>>>>> + ($(inst_libdir)/libm.a): added rule for installation as linker script.
>>>>>> + * Makerules (install-lib.a): filter out install-lib-ldscripts.
>>>>>
>>>>> ChangeLog entries should be in present tense, and written as full
>>>>> sentences.
>>>>
>>>> Which sentence is not full?
>>>
>>> Full sentences start with a capital.
>>
>> Oh yes of course, fixed.
>>
>>
>> --
>> WBR,
>> Andrew
>
> diff --git a/Makerules b/Makerules
> index e865782..573c074 100644
> --- a/Makerules
> +++ b/Makerules
> @@ -1190,7 +1190,8 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
> $(do-install-program)
> endif
> ifdef install-lib
> -install-lib.a := $(filter lib%.a,$(install-lib))
> +install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
> +install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
>
> Need to filler out libm.a separately since it is in install-lib-ldscripts
> already.
Oh surely, attached.
--
WBR,
Andrew
[-- Attachment #2: bz20539.patch --]
[-- Type: application/octet-stream, Size: 2316 bytes --]
diff --git a/ChangeLog b/ChangeLog
index ccfd0ae..e58f68d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-12-07 Andrew Senkevich <andrew.senkevich@intel.com>
+
+ [BZ #20539]
+ * math/Makefile (install-lib-ldscripts): Add libm.a.
+ ($(inst_libdir)/libm.a): Add rule for installation as
+ linker script.
+ * Makerules (install-lib.a): Filter out install-lib-ldscripts.
+
2016-12-07 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/x86/elision-conf.h
diff --git a/Makerules b/Makerules
index e865782..7ac696e 100644
--- a/Makerules
+++ b/Makerules
@@ -1191,6 +1191,7 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
endif
ifdef install-lib
install-lib.a := $(filter lib%.a,$(install-lib))
+install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
ifdef install-lib-non.a
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
diff --git a/math/Makefile b/math/Makefile
index 848b093..77031b1 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -128,10 +128,10 @@ generated += $(foreach s,.c .S,$(call type-foreach, $(calls:s_%=m_%$(s))))
routines = $(call type-foreach, $(calls))
ifeq ($(build-mathvec),yes)
-# We need to install libm.so as linker script
-# for more comfortable use of vector math library.
-install-lib-ldscripts := libm.so
-install_subdir: $(inst_libdir)/libm.so
+# We need to install libm.so and libm.a as linker scripts
+# for transparent use of vector math library.
+install-lib-ldscripts := libm.so libm.a
+install-others: $(inst_libdir)/libm.so $(inst_libdir)/libm.a
$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
$(libm) \
$(libmvec) \
@@ -142,6 +142,18 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
'AS_NEEDED ( $(libdir)/libmvec_nonshared.a $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
) > $@.new
mv -f $@.new $@
+
+install-others = $(inst_libdir)/libm.a
+$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
+ $(libm) \
+ $(libmvec) \
+ $(+force)
+ (echo '/* GNU ld script'; echo '*/';\
+ cat $<; \
+ echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
+ ) > $@.new
+ cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
+ mv -f $@.new $@
endif
# Rules for the test suite.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-07 10:34 ` Andrew Senkevich
@ 2016-12-07 16:22 ` H.J. Lu
2016-12-07 20:04 ` Andrew Senkevich
0 siblings, 1 reply; 26+ messages in thread
From: H.J. Lu @ 2016-12-07 16:22 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: Andreas Schwab, libc-alpha
On Wed, Dec 7, 2016 at 2:34 AM, Andrew Senkevich
<andrew.n.senkevich@gmail.com> wrote:
> 2016-12-07 0:48 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
>> On Tue, Dec 6, 2016 at 7:49 AM, Andrew Senkevich
>> <andrew.n.senkevich@gmail.com> wrote:
>>> 2016-12-06 18:21 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>>
>>>>> 2016-12-06 17:17 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>>>>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>>>>
>>>>>>> +2016-12-06 Andrew Senkevich <andrew.senkevich@intel.com>
>>>>>>> +
>>>>>>> + [BZ #20539]
>>>>>>> + * math/Makefile (install-lib-ldscripts): added libm.a.
>>>>>>> + ($(inst_libdir)/libm.a): added rule for installation as linker script.
>>>>>>> + * Makerules (install-lib.a): filter out install-lib-ldscripts.
>>>>>>
>>>>>> ChangeLog entries should be in present tense, and written as full
>>>>>> sentences.
>>>>>
>>>>> Which sentence is not full?
>>>>
>>>> Full sentences start with a capital.
>>>
>>> Oh yes of course, fixed.
>>>
>>>
>>> --
>>> WBR,
>>> Andrew
>>
>> diff --git a/Makerules b/Makerules
>> index e865782..573c074 100644
>> --- a/Makerules
>> +++ b/Makerules
>> @@ -1190,7 +1190,8 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
>> $(do-install-program)
>> endif
>> ifdef install-lib
>> -install-lib.a := $(filter lib%.a,$(install-lib))
>> +install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
>> +install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
>>
>> Need to filler out libm.a separately since it is in install-lib-ldscripts
>> already.
>
> Oh surely, attached.
>
>
> --
> WBR,
> Andrew
diff --git a/math/Makefile b/math/Makefile
index 848b093..77031b1 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -128,10 +128,10 @@ generated += $(foreach s,.c .S,$(call
type-foreach, $(calls:s_%=m_%$(s))))
routines = $(call type-foreach, $(calls))
ifeq ($(build-mathvec),yes)
-# We need to install libm.so as linker script
-# for more comfortable use of vector math library.
-install-lib-ldscripts := libm.so
-install_subdir: $(inst_libdir)/libm.so
+# We need to install libm.so and libm.a as linker scripts
+# for transparent use of vector math library.
+install-lib-ldscripts := libm.so libm.a
+install-others: $(inst_libdir)/libm.so $(inst_libdir)/libm.a
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here is install-others.
$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
$(libm) \
$(libmvec) \
@@ -142,6 +142,18 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
'AS_NEEDED ( $(libdir)/libmvec_nonshared.a
$(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
) > $@.new
mv -f $@.new $@
+
+install-others = $(inst_libdir)/libm.a
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Is this needed?
+$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
+ $(libm) \
+ $(libmvec) \
+ $(+force)
+ (echo '/* GNU ld script'; echo '*/';\
+ cat $<; \
+ echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
+ ) > $@.new
+ cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
+ mv -f $@.new $@
endif
--
H.J.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-07 16:22 ` H.J. Lu
@ 2016-12-07 20:04 ` Andrew Senkevich
2016-12-07 21:50 ` H.J. Lu
2016-12-09 15:39 ` Andreas Schwab
0 siblings, 2 replies; 26+ messages in thread
From: Andrew Senkevich @ 2016-12-07 20:04 UTC (permalink / raw)
To: H.J. Lu; +Cc: Andreas Schwab, libc-alpha
[-- Attachment #1: Type: text/plain, Size: 3094 bytes --]
2016-12-07 19:21 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
> On Wed, Dec 7, 2016 at 2:34 AM, Andrew Senkevich
> <andrew.n.senkevich@gmail.com> wrote:
>> 2016-12-07 0:48 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
>>> On Tue, Dec 6, 2016 at 7:49 AM, Andrew Senkevich
>>> <andrew.n.senkevich@gmail.com> wrote:
>>>> 2016-12-06 18:21 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>>>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>>>
>>>>>> 2016-12-06 17:17 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>>>>>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>>>>>
>>>>>>>> +2016-12-06 Andrew Senkevich <andrew.senkevich@intel.com>
>>>>>>>> +
>>>>>>>> + [BZ #20539]
>>>>>>>> + * math/Makefile (install-lib-ldscripts): added libm.a.
>>>>>>>> + ($(inst_libdir)/libm.a): added rule for installation as linker script.
>>>>>>>> + * Makerules (install-lib.a): filter out install-lib-ldscripts.
>>>>>>>
>>>>>>> ChangeLog entries should be in present tense, and written as full
>>>>>>> sentences.
>>>>>>
>>>>>> Which sentence is not full?
>>>>>
>>>>> Full sentences start with a capital.
>>>>
>>>> Oh yes of course, fixed.
>>>>
>>>>
>>>> --
>>>> WBR,
>>>> Andrew
>>>
>>> diff --git a/Makerules b/Makerules
>>> index e865782..573c074 100644
>>> --- a/Makerules
>>> +++ b/Makerules
>>> @@ -1190,7 +1190,8 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
>>> $(do-install-program)
>>> endif
>>> ifdef install-lib
>>> -install-lib.a := $(filter lib%.a,$(install-lib))
>>> +install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
>>> +install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
>>>
>>> Need to filler out libm.a separately since it is in install-lib-ldscripts
>>> already.
>>
>> Oh surely, attached.
>>
>>
>> --
>> WBR,
>> Andrew
>
> diff --git a/math/Makefile b/math/Makefile
> index 848b093..77031b1 100644
> --- a/math/Makefile
> +++ b/math/Makefile
> @@ -128,10 +128,10 @@ generated += $(foreach s,.c .S,$(call
> type-foreach, $(calls:s_%=m_%$(s))))
> routines = $(call type-foreach, $(calls))
>
> ifeq ($(build-mathvec),yes)
> -# We need to install libm.so as linker script
> -# for more comfortable use of vector math library.
> -install-lib-ldscripts := libm.so
> -install_subdir: $(inst_libdir)/libm.so
> +# We need to install libm.so and libm.a as linker scripts
> +# for transparent use of vector math library.
> +install-lib-ldscripts := libm.so libm.a
> +install-others: $(inst_libdir)/libm.so $(inst_libdir)/libm.a
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Here is install-others.
>
> $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
> $(libm) \
> $(libmvec) \
> @@ -142,6 +142,18 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
> 'AS_NEEDED ( $(libdir)/libmvec_nonshared.a
> $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
> ) > $@.new
> mv -f $@.new $@
> +
> +install-others = $(inst_libdir)/libm.a
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Is this needed?
Indeed not needed. Tested with attached patch.
--
WBR,
Andrew
[-- Attachment #2: bz20539.patch --]
[-- Type: application/octet-stream, Size: 2277 bytes --]
diff --git a/ChangeLog b/ChangeLog
index ccfd0ae..a264189 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-12-07 Andrew Senkevich <andrew.senkevich@intel.com>
+
+ [BZ #20539]
+ * math/Makefile (install-lib-ldscripts): Add libm.a.
+ ($(inst_libdir)/libm.a): Add rule for installation as
+ linker script.
+ * Makerules (install-lib.a): Filter out install-lib-ldscripts.
+
2016-12-07 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/x86/elision-conf.h
diff --git a/Makerules b/Makerules
index e865782..7ac696e 100644
--- a/Makerules
+++ b/Makerules
@@ -1191,6 +1191,7 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
endif
ifdef install-lib
install-lib.a := $(filter lib%.a,$(install-lib))
+install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
ifdef install-lib-non.a
$(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
diff --git a/math/Makefile b/math/Makefile
index 848b093..49556f6 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -128,10 +128,10 @@ generated += $(foreach s,.c .S,$(call type-foreach, $(calls:s_%=m_%$(s))))
routines = $(call type-foreach, $(calls))
ifeq ($(build-mathvec),yes)
-# We need to install libm.so as linker script
-# for more comfortable use of vector math library.
-install-lib-ldscripts := libm.so
-install_subdir: $(inst_libdir)/libm.so
+# We need to install libm.so and libm.a as linker scripts
+# for transparent use of vector math library.
+install-lib-ldscripts := libm.so libm.a
+install-others = $(inst_libdir)/libm.so $(inst_libdir)/libm.a
$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
$(libm) \
$(libmvec) \
@@ -142,6 +142,17 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
'AS_NEEDED ( $(libdir)/libmvec_nonshared.a $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
) > $@.new
mv -f $@.new $@
+
+$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
+ $(libm) \
+ $(libmvec) \
+ $(+force)
+ (echo '/* GNU ld script'; echo '*/';\
+ cat $<; \
+ echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
+ ) > $@.new
+ cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
+ mv -f $@.new $@
endif
# Rules for the test suite.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-07 20:04 ` Andrew Senkevich
@ 2016-12-07 21:50 ` H.J. Lu
2016-12-09 15:39 ` Andreas Schwab
1 sibling, 0 replies; 26+ messages in thread
From: H.J. Lu @ 2016-12-07 21:50 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: Andreas Schwab, libc-alpha
On Wed, Dec 7, 2016 at 12:03 PM, Andrew Senkevich
<andrew.n.senkevich@gmail.com> wrote:
> 2016-12-07 19:21 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
>> On Wed, Dec 7, 2016 at 2:34 AM, Andrew Senkevich
>> <andrew.n.senkevich@gmail.com> wrote:
>>> 2016-12-07 0:48 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
>>>> On Tue, Dec 6, 2016 at 7:49 AM, Andrew Senkevich
>>>> <andrew.n.senkevich@gmail.com> wrote:
>>>>> 2016-12-06 18:21 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>>>>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>>>>
>>>>>>> 2016-12-06 17:17 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>>>>>>> On Dez 06 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> +2016-12-06 Andrew Senkevich <andrew.senkevich@intel.com>
>>>>>>>>> +
>>>>>>>>> + [BZ #20539]
>>>>>>>>> + * math/Makefile (install-lib-ldscripts): added libm.a.
>>>>>>>>> + ($(inst_libdir)/libm.a): added rule for installation as linker script.
>>>>>>>>> + * Makerules (install-lib.a): filter out install-lib-ldscripts.
>>>>>>>>
>>>>>>>> ChangeLog entries should be in present tense, and written as full
>>>>>>>> sentences.
>>>>>>>
>>>>>>> Which sentence is not full?
>>>>>>
>>>>>> Full sentences start with a capital.
>>>>>
>>>>> Oh yes of course, fixed.
>>>>>
>>>>>
>>>>> --
>>>>> WBR,
>>>>> Andrew
>>>>
>>>> diff --git a/Makerules b/Makerules
>>>> index e865782..573c074 100644
>>>> --- a/Makerules
>>>> +++ b/Makerules
>>>> @@ -1190,7 +1190,8 @@ $(addprefix $(inst_sbindir)/,$(install-sbin)): \
>>>> $(do-install-program)
>>>> endif
>>>> ifdef install-lib
>>>> -install-lib.a := $(filter lib%.a,$(install-lib))
>>>> +install-lib.a := $(filter-out libm.a,$(filter lib%.a,$(install-lib)))
>>>> +install-lib.a := $(filter-out $(install-lib-ldscripts),$(install-lib.a))
>>>>
>>>> Need to filler out libm.a separately since it is in install-lib-ldscripts
>>>> already.
>>>
>>> Oh surely, attached.
>>>
>>>
>>> --
>>> WBR,
>>> Andrew
>>
>> diff --git a/math/Makefile b/math/Makefile
>> index 848b093..77031b1 100644
>> --- a/math/Makefile
>> +++ b/math/Makefile
>> @@ -128,10 +128,10 @@ generated += $(foreach s,.c .S,$(call
>> type-foreach, $(calls:s_%=m_%$(s))))
>> routines = $(call type-foreach, $(calls))
>>
>> ifeq ($(build-mathvec),yes)
>> -# We need to install libm.so as linker script
>> -# for more comfortable use of vector math library.
>> -install-lib-ldscripts := libm.so
>> -install_subdir: $(inst_libdir)/libm.so
>> +# We need to install libm.so and libm.a as linker scripts
>> +# for transparent use of vector math library.
>> +install-lib-ldscripts := libm.so libm.a
>> +install-others: $(inst_libdir)/libm.so $(inst_libdir)/libm.a
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> Here is install-others.
>>
>> $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
>> $(libm) \
>> $(libmvec) \
>> @@ -142,6 +142,18 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
>> 'AS_NEEDED ( $(libdir)/libmvec_nonshared.a
>> $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
>> ) > $@.new
>> mv -f $@.new $@
>> +
>> +install-others = $(inst_libdir)/libm.a
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> Is this needed?
>
> Indeed not needed. Tested with attached patch.
>
>
Please update ChangeLog entry: install_subdir is removed
and install-others is added in math/Makefile. Otherwise, it
looks good to me.
Thanks.
--
H.J.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-07 20:04 ` Andrew Senkevich
2016-12-07 21:50 ` H.J. Lu
@ 2016-12-09 15:39 ` Andreas Schwab
2016-12-09 17:42 ` Andrew Senkevich
1 sibling, 1 reply; 26+ messages in thread
From: Andreas Schwab @ 2016-12-09 15:39 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: H.J. Lu, libc-alpha
On Dez 07 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
> +$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
> + $(libm) \
> + $(libmvec) \
> + $(+force)
> + (echo '/* GNU ld script'; echo '*/';\
> + cat $<; \
> + echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
> + ) > $@.new
> + cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
A rule should only create the target, nothing else.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-09 15:39 ` Andreas Schwab
@ 2016-12-09 17:42 ` Andrew Senkevich
2016-12-09 18:23 ` Andreas Schwab
0 siblings, 1 reply; 26+ messages in thread
From: Andrew Senkevich @ 2016-12-09 17:42 UTC (permalink / raw)
To: Andreas Schwab; +Cc: H.J. Lu, libc-alpha
2016-12-09 18:38 GMT+03:00 Andreas Schwab <schwab@suse.de>:
> On Dez 07 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>
>> +$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
>> + $(libm) \
>> + $(libmvec) \
>> + $(+force)
>> + (echo '/* GNU ld script'; echo '*/';\
>> + cat $<; \
>> + echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
>> + ) > $@.new
>> + cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
>
> A rule should only create the target, nothing else.
Is the following update Ok?
diff --git a/math/Makefile b/math/Makefile
index 49556f6..ebbb8ee 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -144,14 +144,13 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
mv -f $@.new $@
$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
- $(libm) \
- $(libmvec) \
+ $(objpfx)copy-libm.a.stmp \
+ $(objpfx)../mathvec/libmvec.a \
$(+force)
(echo '/* GNU ld script'; echo '*/';\
cat $<; \
echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
) > $@.new
- cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
mv -f $@.new $@
endif
@@ -193,7 +192,7 @@ libm-vec-test-wrappers = $(addsuffix -wrappers,
$(libm-vec-tests))
test-extras += $(libm-vec-test-wrappers)
extra-test-objs += $(addsuffix .o, $(libm-vec-test-wrappers))
libm-tests-generated = libm-test-ulps.h libm-have-vector-test.h libm-test.c
-generated += $(libm-tests-generated) libm-test.stmp
+generated += $(libm-tests-generated) libm-test.stmp copy-libm.a.stmp
# This is needed for dependencies
before-compile += $(objpfx)libm-test.c
@@ -208,6 +207,10 @@ $(objpfx)libm-test.stmp: $(ulps-file)
libm-test.inc gen-libm-test.pl \
$(PERL) gen-libm-test.pl -u $< -o "$(objpfx)"
$(SHELL) gen-libm-have-vector-test.sh > $(objpfx)libm-have-vector-test.h
@echo > $@
+
+$(objpfx)copy-libm.a.stmp: $(objpfx)libm.a
+ cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
+ @echo > $@
endif
libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
--
WBR,
Andrew
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-09 17:42 ` Andrew Senkevich
@ 2016-12-09 18:23 ` Andreas Schwab
2016-12-12 15:45 ` Andrew Senkevich
0 siblings, 1 reply; 26+ messages in thread
From: Andreas Schwab @ 2016-12-09 18:23 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: H.J. Lu, libc-alpha
On Dez 09 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
> 2016-12-09 18:38 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>> On Dez 07 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>
>>> +$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
>>> + $(libm) \
>>> + $(libmvec) \
>>> + $(+force)
>>> + (echo '/* GNU ld script'; echo '*/';\
>>> + cat $<; \
>>> + echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
>>> + ) > $@.new
>>> + cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
>>
>> A rule should only create the target, nothing else.
>
> Is the following update Ok?
There is no neeed to go through a stamp file, just depend on
$(inst_libdir)/libm-$(lib-version).a, and add a rule which copies
$(objpfx)libm.a there.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-09 18:23 ` Andreas Schwab
@ 2016-12-12 15:45 ` Andrew Senkevich
2016-12-12 16:18 ` Andreas Schwab
0 siblings, 1 reply; 26+ messages in thread
From: Andrew Senkevich @ 2016-12-12 15:45 UTC (permalink / raw)
To: Andreas Schwab; +Cc: H.J. Lu, libc-alpha
[-- Attachment #1: Type: text/plain, Size: 2110 bytes --]
2016-12-09 21:23 GMT+03:00 Andreas Schwab <schwab@suse.de>:
> On Dez 09 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>
>> 2016-12-09 18:38 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>> On Dez 07 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>
>>>> +$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
>>>> + $(libm) \
>>>> + $(libmvec) \
>>>> + $(+force)
>>>> + (echo '/* GNU ld script'; echo '*/';\
>>>> + cat $<; \
>>>> + echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
>>>> + ) > $@.new
>>>> + cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
>>>
>>> A rule should only create the target, nothing else.
>>
>> Is the following update Ok?
>
> There is no neeed to go through a stamp file, just depend on
> $(inst_libdir)/libm-$(lib-version).a, and add a rule which copies
> $(objpfx)libm.a there.
I see. Is it ok:
diff --git a/ChangeLog b/ChangeLog
index 4d31f4f..a5336d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-12 Andrew Senkevich <andrew.senkevich@intel.com>
+
+ * math/Makefile ($(inst_libdir)/libm-$(lib-version).a): New target.
+ ($(inst_libdir)/libm.a): Correct rule to create the target only.
+
2016-12-10 Florian Weimer <fweimer@redhat.com>
[BZ #20956]
diff --git a/math/Makefile b/math/Makefile
index 49556f6..38ce4ab 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -143,15 +143,17 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
) > $@.new
mv -f $@.new $@
+$(inst_libdir)/libm-$(lib-version).a: $(objpfx)libm.a
+ cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
+
$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
- $(libm) \
- $(libmvec) \
+ $(inst_libdir)/libm-$(lib-version).a \
+ $(objpfx)../mathvec/libmvec.a \
$(+force)
(echo '/* GNU ld script'; echo '*/';\
cat $<; \
echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
) > $@.new
- cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
mv -f $@.new $@
endif
--
WBR,
Andrew
[-- Attachment #2: bz20539_followup.patch --]
[-- Type: application/octet-stream, Size: 1148 bytes --]
diff --git a/ChangeLog b/ChangeLog
index 4d31f4f..a5336d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-12 Andrew Senkevich <andrew.senkevich@intel.com>
+
+ * math/Makefile ($(inst_libdir)/libm-$(lib-version).a): New target.
+ ($(inst_libdir)/libm.a): Correct rule to create the target only.
+
2016-12-10 Florian Weimer <fweimer@redhat.com>
[BZ #20956]
diff --git a/math/Makefile b/math/Makefile
index 49556f6..38ce4ab 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -143,15 +143,17 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
) > $@.new
mv -f $@.new $@
+$(inst_libdir)/libm-$(lib-version).a: $(objpfx)libm.a
+ cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
+
$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
- $(libm) \
- $(libmvec) \
+ $(inst_libdir)/libm-$(lib-version).a \
+ $(objpfx)../mathvec/libmvec.a \
$(+force)
(echo '/* GNU ld script'; echo '*/';\
cat $<; \
echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
) > $@.new
- cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
mv -f $@.new $@
endif
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-12 15:45 ` Andrew Senkevich
@ 2016-12-12 16:18 ` Andreas Schwab
2016-12-12 16:29 ` Andrew Senkevich
0 siblings, 1 reply; 26+ messages in thread
From: Andreas Schwab @ 2016-12-12 16:18 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: H.J. Lu, libc-alpha
On Dez 12 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
> diff --git a/math/Makefile b/math/Makefile
> index 49556f6..38ce4ab 100644
> --- a/math/Makefile
> +++ b/math/Makefile
> @@ -143,15 +143,17 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
> ) > $@.new
> mv -f $@.new $@
>
> +$(inst_libdir)/libm-$(lib-version).a: $(objpfx)libm.a
> + cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
Use automatic variables.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-12 16:18 ` Andreas Schwab
@ 2016-12-12 16:29 ` Andrew Senkevich
2016-12-12 16:42 ` Andreas Schwab
0 siblings, 1 reply; 26+ messages in thread
From: Andrew Senkevich @ 2016-12-12 16:29 UTC (permalink / raw)
To: Andreas Schwab; +Cc: H.J. Lu, libc-alpha
2016-12-12 19:18 GMT+03:00 Andreas Schwab <schwab@suse.de>:
> On Dez 12 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>
>> diff --git a/math/Makefile b/math/Makefile
>> index 49556f6..38ce4ab 100644
>> --- a/math/Makefile
>> +++ b/math/Makefile
>> @@ -143,15 +143,17 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
>> ) > $@.new
>> mv -f $@.new $@
>>
>> +$(inst_libdir)/libm-$(lib-version).a: $(objpfx)libm.a
>> + cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
>
> Use automatic variables.
I also have tried
>> +$(inst_libdir)/libm-$(lib-version).a: $(objpfx)libm.a
>> + cp $(objpfx)libm.a $@
but it doesn't work. libm-.a was created instead of libm-2.24.90.a.
--
WBR,
Andrew
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-12 16:29 ` Andrew Senkevich
@ 2016-12-12 16:42 ` Andreas Schwab
2016-12-12 17:58 ` Andrew Senkevich
0 siblings, 1 reply; 26+ messages in thread
From: Andreas Schwab @ 2016-12-12 16:42 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: H.J. Lu, libc-alpha
On Dez 12 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
> 2016-12-12 19:18 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>> On Dez 12 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>
>>> diff --git a/math/Makefile b/math/Makefile
>>> index 49556f6..38ce4ab 100644
>>> --- a/math/Makefile
>>> +++ b/math/Makefile
>>> @@ -143,15 +143,17 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
>>> ) > $@.new
>>> mv -f $@.new $@
>>>
>>> +$(inst_libdir)/libm-$(lib-version).a: $(objpfx)libm.a
>>> + cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
>>
>> Use automatic variables.
>
> I also have tried
>
>>> +$(inst_libdir)/libm-$(lib-version).a: $(objpfx)libm.a
>>> + cp $(objpfx)libm.a $@
>
> but it doesn't work. libm-.a was created instead of libm-2.24.90.a.
That means that the target is wrong.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-12 16:42 ` Andreas Schwab
@ 2016-12-12 17:58 ` Andrew Senkevich
2016-12-13 8:41 ` Andreas Schwab
0 siblings, 1 reply; 26+ messages in thread
From: Andrew Senkevich @ 2016-12-12 17:58 UTC (permalink / raw)
To: Andreas Schwab; +Cc: H.J. Lu, libc-alpha
[-- Attachment #1: Type: text/plain, Size: 2164 bytes --]
2016-12-12 19:42 GMT+03:00 Andreas Schwab <schwab@suse.de>:
> On Dez 12 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>
>> 2016-12-12 19:18 GMT+03:00 Andreas Schwab <schwab@suse.de>:
>>> On Dez 12 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>>>
>>>> diff --git a/math/Makefile b/math/Makefile
>>>> index 49556f6..38ce4ab 100644
>>>> --- a/math/Makefile
>>>> +++ b/math/Makefile
>>>> @@ -143,15 +143,17 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
>>>> ) > $@.new
>>>> mv -f $@.new $@
>>>>
>>>> +$(inst_libdir)/libm-$(lib-version).a: $(objpfx)libm.a
>>>> + cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
>>>
>>> Use automatic variables.
>>
>> I also have tried
>>
>>>> +$(inst_libdir)/libm-$(lib-version).a: $(objpfx)libm.a
>>>> + cp $(objpfx)libm.a $@
>>
>> but it doesn't work. libm-.a was created instead of libm-2.24.90.a.
>
> That means that the target is wrong.
Indeed, we need to use $(version).
diff --git a/ChangeLog b/ChangeLog
index 91cc64d..f6ffda8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-12 Andrew Senkevich <andrew.senkevich@intel.com>
+
+ * math/Makefile ($(inst_libdir)/libm-$(version).a): New target.
+ ($(inst_libdir)/libm.a): Correct rule to create the target only.
+
2016-12-12 Florian Weimer <fweimer@redhat.com>
[BZ #17252]
diff --git a/math/Makefile b/math/Makefile
index 49556f6..1973bf2 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -143,15 +143,17 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
) > $@.new
mv -f $@.new $@
+$(inst_libdir)/libm-$(version).a: $(objpfx)libm.a
+ cp $(objpfx)libm.a $@
+
$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
- $(libm) \
- $(libmvec) \
+ $(inst_libdir)/libm-$(version).a \
+ $(objpfx)../mathvec/libmvec.a \
$(+force)
(echo '/* GNU ld script'; echo '*/';\
cat $<; \
- echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
+ echo 'GROUP ( $(libdir)/libm-$(version).a $(libdir)/libmvec.a )' \
) > $@.new
- cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
mv -f $@.new $@
endif
Ok for trunk?
--
WBR,
Andrew
[-- Attachment #2: bz20539_followup.patch --]
[-- Type: application/octet-stream, Size: 1172 bytes --]
diff --git a/ChangeLog b/ChangeLog
index 91cc64d..f6ffda8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-12 Andrew Senkevich <andrew.senkevich@intel.com>
+
+ * math/Makefile ($(inst_libdir)/libm-$(version).a): New target.
+ ($(inst_libdir)/libm.a): Correct rule to create the target only.
+
2016-12-12 Florian Weimer <fweimer@redhat.com>
[BZ #17252]
diff --git a/math/Makefile b/math/Makefile
index 49556f6..1973bf2 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -143,15 +143,17 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
) > $@.new
mv -f $@.new $@
+$(inst_libdir)/libm-$(version).a: $(objpfx)libm.a
+ cp $(objpfx)libm.a $@
+
$(inst_libdir)/libm.a: $(common-objpfx)format.lds \
- $(libm) \
- $(libmvec) \
+ $(inst_libdir)/libm-$(version).a \
+ $(objpfx)../mathvec/libmvec.a \
$(+force)
(echo '/* GNU ld script'; echo '*/';\
cat $<; \
- echo 'GROUP ( $(libdir)/libm-$(lib-version).a $(libdir)/libmvec.a )' \
+ echo 'GROUP ( $(libdir)/libm-$(version).a $(libdir)/libmvec.a )' \
) > $@.new
- cp $(objpfx)libm.a $(inst_libdir)/libm-$(lib-version).a
mv -f $@.new $@
endif
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-12 17:58 ` Andrew Senkevich
@ 2016-12-13 8:41 ` Andreas Schwab
2016-12-13 14:58 ` Andrew Senkevich
0 siblings, 1 reply; 26+ messages in thread
From: Andreas Schwab @ 2016-12-13 8:41 UTC (permalink / raw)
To: Andrew Senkevich; +Cc: H.J. Lu, libc-alpha
On Dez 12 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
> diff --git a/math/Makefile b/math/Makefile
> index 49556f6..1973bf2 100644
> --- a/math/Makefile
> +++ b/math/Makefile
> @@ -143,15 +143,17 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
> ) > $@.new
> mv -f $@.new $@
>
> +$(inst_libdir)/libm-$(version).a: $(objpfx)libm.a
> + cp $(objpfx)libm.a $@
This should use $(do-install), and all install targets should depend on
$(+force). Ok with that change.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] Install libm.a as linker script [BZ #20539]
2016-12-13 8:41 ` Andreas Schwab
@ 2016-12-13 14:58 ` Andrew Senkevich
0 siblings, 0 replies; 26+ messages in thread
From: Andrew Senkevich @ 2016-12-13 14:58 UTC (permalink / raw)
To: Andreas Schwab; +Cc: H.J. Lu, libc-alpha
2016-12-13 11:41 GMT+03:00 Andreas Schwab <schwab@suse.de>:
> On Dez 12 2016, Andrew Senkevich <andrew.n.senkevich@gmail.com> wrote:
>
>> diff --git a/math/Makefile b/math/Makefile
>> index 49556f6..1973bf2 100644
>> --- a/math/Makefile
>> +++ b/math/Makefile
>> @@ -143,15 +143,17 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \
>> ) > $@.new
>> mv -f $@.new $@
>>
>> +$(inst_libdir)/libm-$(version).a: $(objpfx)libm.a
>> + cp $(objpfx)libm.a $@
>
> This should use $(do-install), and all install targets should depend on
> $(+force). Ok with that change.
Committed, thanks.
--
WBR,
Andrew
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2016-12-13 14:58 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-20 19:21 [PATCH] Install libm.a as linker script [BZ #20539] Andrew Senkevich
2016-10-24 22:02 ` H.J. Lu
2016-11-14 19:16 ` Andrew Senkevich
2016-11-14 19:22 ` H.J. Lu
2016-12-05 19:40 ` Andrew Senkevich
2016-12-05 20:01 ` H.J. Lu
2016-12-06 12:17 ` Andrew Senkevich
2016-12-06 14:17 ` Andreas Schwab
2016-12-06 14:49 ` Andrew Senkevich
2016-12-06 15:21 ` Andreas Schwab
2016-12-06 15:50 ` Andrew Senkevich
2016-12-06 21:49 ` H.J. Lu
2016-12-07 10:34 ` Andrew Senkevich
2016-12-07 16:22 ` H.J. Lu
2016-12-07 20:04 ` Andrew Senkevich
2016-12-07 21:50 ` H.J. Lu
2016-12-09 15:39 ` Andreas Schwab
2016-12-09 17:42 ` Andrew Senkevich
2016-12-09 18:23 ` Andreas Schwab
2016-12-12 15:45 ` Andrew Senkevich
2016-12-12 16:18 ` Andreas Schwab
2016-12-12 16:29 ` Andrew Senkevich
2016-12-12 16:42 ` Andreas Schwab
2016-12-12 17:58 ` Andrew Senkevich
2016-12-13 8:41 ` Andreas Schwab
2016-12-13 14:58 ` Andrew Senkevich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).