Re: [PING][PATCH 5/13] microblaze musl support

2015-10-15 Thread Michael Eager

On 10/15/2015 12:00 PM, Szabolcs Nagy wrote:

On 06/05/15 12:25, Szabolcs Nagy wrote:

On 29/04/15 14:51, Szabolcs Nagy wrote:

On 29/04/15 14:17, Michael Eager wrote:

On 04/27/2015 07:35 AM, Szabolcs Nagy wrote:

On 20/04/15 19:54, Szabolcs Nagy wrote:

Set up dynamic linker name for microblaze.



Patch v2.
(undef MUSL_DYNAMIC_LINKER that comes from config/linux.h)



Are you building with both glibc and musl to verify these patches?


...


note that microblaze does not use the GNU_USER_DYNAMIC_LINKER
macro so the -mglibc etc options don't work.
(that should be changed probably, assuming -muclibc and -mbionic
have no side effects when they are not supported)



Patch v3.

I changed the patch to use GNU_USER_DYNAMIC_LINKER like
other platforms do.

I built gcc with musl and glibc default libc as well and verified
that -mmusl and -mglibc sets the dynamic linker as expected.



Ping,
patch still works.
https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00437.html


gcc/Changelog:

2015-05-06  Gregor Richards  
Szabolcs Nagy  

* config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define.
(DYNAMIC_LINKER): Renamed to ...
(GLIBC_DYNAMIC_LINKER): This.
(SUBTARGET_EXTRA_SPECS): Use GNU_USER_DYNAMIC_LINKER.



OK.  Do you have commit privileges?


--
Michael Eagerea...@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


Re: [PING][PATCH 5/13] microblaze musl support

2015-10-15 Thread Szabolcs Nagy

On 15/10/15 20:04, Michael Eager wrote:

On 10/15/2015 12:00 PM, Szabolcs Nagy wrote:

Ping,
patch still works.
https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00437.html


gcc/Changelog:

2015-05-06  Gregor Richards  
Szabolcs Nagy  

* config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define.
(DYNAMIC_LINKER): Renamed to ...
(GLIBC_DYNAMIC_LINKER): This.
(SUBTARGET_EXTRA_SPECS): Use GNU_USER_DYNAMIC_LINKER.



OK.  Do you have commit privileges?



yes,
will commit it with updated date.




Re: [PING][PATCH 5/13] microblaze musl support

2015-10-15 Thread Szabolcs Nagy

On 06/05/15 12:25, Szabolcs Nagy wrote:

On 29/04/15 14:51, Szabolcs Nagy wrote:

On 29/04/15 14:17, Michael Eager wrote:

On 04/27/2015 07:35 AM, Szabolcs Nagy wrote:

On 20/04/15 19:54, Szabolcs Nagy wrote:

Set up dynamic linker name for microblaze.



Patch v2.
(undef MUSL_DYNAMIC_LINKER that comes from config/linux.h)



Are you building with both glibc and musl to verify these patches?


...


note that microblaze does not use the GNU_USER_DYNAMIC_LINKER
macro so the -mglibc etc options don't work.
(that should be changed probably, assuming -muclibc and -mbionic
have no side effects when they are not supported)



Patch v3.

I changed the patch to use GNU_USER_DYNAMIC_LINKER like
other platforms do.

I built gcc with musl and glibc default libc as well and verified
that -mmusl and -mglibc sets the dynamic linker as expected.



Ping,
patch still works.
https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00437.html


gcc/Changelog:

2015-05-06  Gregor Richards  
Szabolcs Nagy  

* config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define.
(DYNAMIC_LINKER): Renamed to ...
(GLIBC_DYNAMIC_LINKER): This.
(SUBTARGET_EXTRA_SPECS): Use GNU_USER_DYNAMIC_LINKER.





Re: [PATCH 5/13] microblaze musl support

2015-05-06 Thread Szabolcs Nagy


On 29/04/15 14:51, Szabolcs Nagy wrote:
 On 29/04/15 14:17, Michael Eager wrote:
 On 04/27/2015 07:35 AM, Szabolcs Nagy wrote:
 On 20/04/15 19:54, Szabolcs Nagy wrote:
 Set up dynamic linker name for microblaze.


 Patch v2.
 (undef MUSL_DYNAMIC_LINKER that comes from config/linux.h)


 Are you building with both glibc and musl to verify these patches?

...
 
 note that microblaze does not use the GNU_USER_DYNAMIC_LINKER
 macro so the -mglibc etc options don't work.
 (that should be changed probably, assuming -muclibc and -mbionic
 have no side effects when they are not supported)
 

Patch v3.

I changed the patch to use GNU_USER_DYNAMIC_LINKER like
other platforms do.

I built gcc with musl and glibc default libc as well and verified
that -mmusl and -mglibc sets the dynamic linker as expected.

gcc/Changelog:

2015-05-06  Gregor Richards  gregor.richa...@uwaterloo.ca
Szabolcs Nagy  szabolcs.n...@arm.com

* config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define.
(DYNAMIC_LINKER): Renamed to ...
(GLIBC_DYNAMIC_LINKER): This.
(SUBTARGET_EXTRA_SPECS): Use GNU_USER_DYNAMIC_LINKER.
diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h
index a7faa7d..95e2940 100644
--- a/gcc/config/microblaze/linux.h
+++ b/gcc/config/microblaze/linux.h
@@ -25,10 +25,20 @@
 #undef TLS_NEEDS_GOT
 #define TLS_NEEDS_GOT 1
 
-#define DYNAMIC_LINKER /lib/ld.so.1
+#define GLIBC_DYNAMIC_LINKER /lib/ld.so.1
+
+#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
+#define MUSL_DYNAMIC_LINKER_E %{mbig-endian:;:el}
+#else
+#define MUSL_DYNAMIC_LINKER_E %{mlittle-endian:el}
+#endif
+
+#undef MUSL_DYNAMIC_LINKER
+#define MUSL_DYNAMIC_LINKER /lib/ld-musl-microblaze MUSL_DYNAMIC_LINKER_E .so.1
+
 #undef  SUBTARGET_EXTRA_SPECS
 #define SUBTARGET_EXTRA_SPECS \
-  { dynamic_linker, DYNAMIC_LINKER }
+  { dynamic_linker, GNU_USER_DYNAMIC_LINKER }
 
 #undef LINK_SPEC
 #define LINK_SPEC %{shared:-shared} \


Re: [PATCH 5/13] microblaze musl support

2015-04-29 Thread Michael Eager

On 04/27/2015 07:35 AM, Szabolcs Nagy wrote:


On 20/04/15 19:54, Szabolcs Nagy wrote:

Set up dynamic linker name for microblaze.



Patch v2.
(undef MUSL_DYNAMIC_LINKER that comes from config/linux.h)

gcc/Changelog:

2015-04-24  Gregor Richards  gregor.richa...@uwaterloo.ca

* config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define.
(DYNAMIC_LINKER): Change.



Are you building with both glibc and musl to verify these patches?

--
Michael Eagerea...@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


Re: [PATCH 5/13] microblaze musl support

2015-04-29 Thread Szabolcs Nagy


On 29/04/15 14:17, Michael Eager wrote:
 On 04/27/2015 07:35 AM, Szabolcs Nagy wrote:

 On 20/04/15 19:54, Szabolcs Nagy wrote:
 Set up dynamic linker name for microblaze.


 Patch v2.
 (undef MUSL_DYNAMIC_LINKER that comes from config/linux.h)

 gcc/Changelog:

 2015-04-24  Gregor Richards  gregor.richa...@uwaterloo.ca

  * config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define.
  (DYNAMIC_LINKER): Change.

 
 Are you building with both glibc and musl to verify these patches?
 

i tested various aarch64 and x86 configurations with both glibc
and musl, but not everything was tested.

in particular microblaze (big and little endian) was only built
with musl.

note that microblaze does not use the GNU_USER_DYNAMIC_LINKER
macro so the -mglibc etc options don't work.
(that should be changed probably, assuming -muclibc and -mbionic
have no side effects when they are not supported)



Re: [PATCH 5/13] microblaze musl support

2015-04-27 Thread Szabolcs Nagy

On 20/04/15 19:54, Szabolcs Nagy wrote:
 Set up dynamic linker name for microblaze.
 

Patch v2.
(undef MUSL_DYNAMIC_LINKER that comes from config/linux.h)

gcc/Changelog:

2015-04-24  Gregor Richards  gregor.richa...@uwaterloo.ca

* config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define.
(DYNAMIC_LINKER): Change.
diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h
index a7faa7d..3e08138 100644
--- a/gcc/config/microblaze/linux.h
+++ b/gcc/config/microblaze/linux.h
@@ -25,7 +25,22 @@
 #undef TLS_NEEDS_GOT
 #define TLS_NEEDS_GOT 1
 
-#define DYNAMIC_LINKER /lib/ld.so.1
+#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
+#define MUSL_DYNAMIC_LINKER_E %{mbig-endian:;:el}
+#else
+#define MUSL_DYNAMIC_LINKER_E %{mlittle-endian:el}
+#endif
+
+#undef MUSL_DYNAMIC_LINKER
+#define MUSL_DYNAMIC_LINKER /lib/ld-musl-microblaze MUSL_DYNAMIC_LINKER_E .so.1
+#define GLIBC_DYNAMIC_LINKER /lib/ld.so.1
+
+#if DEFAULT_LIBC == LIBC_MUSL
+#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER
+#else
+#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
+#endif
+
 #undef  SUBTARGET_EXTRA_SPECS
 #define SUBTARGET_EXTRA_SPECS \
   { dynamic_linker, DYNAMIC_LINKER }


[PATCH 5/13] microblaze musl support

2015-04-20 Thread Szabolcs Nagy
Set up dynamic linker name for microblaze.

gcc/Changelog:

2015-04-16  Gregor Richards  gregor.richa...@uwaterloo.ca

* config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define.
(DYNAMIC_LINKER): Change.
diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h
index a7faa7d..14fe41e 100644
--- a/gcc/config/microblaze/linux.h
+++ b/gcc/config/microblaze/linux.h
@@ -25,7 +25,21 @@
 #undef TLS_NEEDS_GOT
 #define TLS_NEEDS_GOT 1
 
-#define DYNAMIC_LINKER /lib/ld.so.1
+#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
+#define MUSL_DYNAMIC_LINKER_E %{EB:;:el}
+#else
+#define MUSL_DYNAMIC_LINKER_E %{EL:el}
+#endif
+
+#define MUSL_DYNAMIC_LINKER /lib/ld-musl-microblaze MUSL_DYNAMIC_LINKER_E .so.1
+#define GLIBC_DYNAMIC_LINKER /lib/ld.so.1
+
+#if DEFAULT_LIBC == LIBC_MUSL
+#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER
+#else
+#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
+#endif
+
 #undef  SUBTARGET_EXTRA_SPECS
 #define SUBTARGET_EXTRA_SPECS \
   { dynamic_linker, DYNAMIC_LINKER }