Re: PATCH: Use crtbegin_so%O%s/crtend_so%O%s for -mandroid -shared

2012-03-28 Thread Maxim Kuvyrkov
This is OK.  I didn't encounter building shared libraries for Android when 
developed the original Android support.

You can commit this under the "obvious patch" rule.  [I've asked SC for 
reviewer privileges for Android support, so that I can approve more complex 
patches.]

Thank you,

--
Maxim Kuvyrkov
CodeSourcery / Mentor Graphics



On 15/12/2011, at 6:11 AM, H.J. Lu wrote:

> Hi,
> 
> Android uses crtbegin_so.o and crtend_so.o to build shared library with
> -mshared.  OK for trunk in stage 1?
> 
> 
> H.J.
> ---
> 2011-12-13  H.J. Lu  
> 
>   * config/linux-android.h (ANDROID_STARTFILE_SPEC): Use
>   crtbegin_so%O%s for -shared.
>   (ANDROID_ENDFILE_SPEC): Use crtend_so%O%s for -shared.
> ---
> gcc/ChangeLog.android  |5 +
> gcc/config/linux-android.h |4 ++--
> 2 files changed, 7 insertions(+), 2 deletions(-)
> create mode 100644 gcc/ChangeLog.android
> 
> diff --git a/gcc/ChangeLog.android b/gcc/ChangeLog.android
> new file mode 100644
> index 000..fc54522
> --- /dev/null
> +++ b/gcc/ChangeLog.android
> @@ -0,0 +1,5 @@
> +2011-12-13  H.J. Lu  
> +
> + * config/linux-android.h (ANDROID_STARTFILE_SPEC): Use
> + crtbegin_so%O%s for -shared.
> + (ANDROID_ENDFILE_SPEC): Use crtend_so%O%s for -shared.
> diff --git a/gcc/config/linux-android.h b/gcc/config/linux-android.h
> index 94c5274..acbc662 100644
> --- a/gcc/config/linux-android.h
> +++ b/gcc/config/linux-android.h
> @@ -53,8 +53,8 @@
>   "%{!static: -ldl}"
> 
> #define ANDROID_STARTFILE_SPEC
> \
> -  "%{!shared:"   
> \
> +  "%{shared: crtbegin_so%O%s;:"  
> \
>   "  %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}"
> 
> #define ANDROID_ENDFILE_SPEC \
> -  "%{!shared: crtend_android%O%s}"
> +  "%{shared: crtend_so%O%s;: crtend_android%O%s}"
> -- 
> 1.7.6.4
> 



Re: PATCH: Use crtbegin_so%O%s/crtend_so%O%s for -mandroid -shared

2012-02-22 Thread Jing Yu
I am OK with the patch, I am not a maintainer though.

Jing

On Wed, Dec 14, 2011 at 9:11 AM, H.J. Lu  wrote:
> Hi,
>
> Android uses crtbegin_so.o and crtend_so.o to build shared library with
> -mshared.  OK for trunk in stage 1?
>
>
> H.J.
> ---
> 2011-12-13  H.J. Lu  
>
>        * config/linux-android.h (ANDROID_STARTFILE_SPEC): Use
>        crtbegin_so%O%s for -shared.
>        (ANDROID_ENDFILE_SPEC): Use crtend_so%O%s for -shared.
> ---
>  gcc/ChangeLog.android      |    5 +
>  gcc/config/linux-android.h |    4 ++--
>  2 files changed, 7 insertions(+), 2 deletions(-)
>  create mode 100644 gcc/ChangeLog.android
>
> diff --git a/gcc/ChangeLog.android b/gcc/ChangeLog.android
> new file mode 100644
> index 000..fc54522
> --- /dev/null
> +++ b/gcc/ChangeLog.android
> @@ -0,0 +1,5 @@
> +2011-12-13  H.J. Lu  
> +
> +       * config/linux-android.h (ANDROID_STARTFILE_SPEC): Use
> +       crtbegin_so%O%s for -shared.
> +       (ANDROID_ENDFILE_SPEC): Use crtend_so%O%s for -shared.
> diff --git a/gcc/config/linux-android.h b/gcc/config/linux-android.h
> index 94c5274..acbc662 100644
> --- a/gcc/config/linux-android.h
> +++ b/gcc/config/linux-android.h
> @@ -53,8 +53,8 @@
>   "%{!static: -ldl}"
>
>  #define ANDROID_STARTFILE_SPEC                                         \
> -  "%{!shared:"                                                         \
> +  "%{shared: crtbegin_so%O%s;:"                                              
>   \
>   "  %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}"
>
>  #define ANDROID_ENDFILE_SPEC \
> -  "%{!shared: crtend_android%O%s}"
> +  "%{shared: crtend_so%O%s;: crtend_android%O%s}"
> --
> 1.7.6.4
>


PATCH: Use crtbegin_so%O%s/crtend_so%O%s for -mandroid -shared

2011-12-14 Thread H.J. Lu
Hi,

Android uses crtbegin_so.o and crtend_so.o to build shared library with
-mshared.  OK for trunk in stage 1?


H.J.
---
2011-12-13  H.J. Lu  

* config/linux-android.h (ANDROID_STARTFILE_SPEC): Use
crtbegin_so%O%s for -shared.
(ANDROID_ENDFILE_SPEC): Use crtend_so%O%s for -shared.
---
 gcc/ChangeLog.android  |5 +
 gcc/config/linux-android.h |4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
 create mode 100644 gcc/ChangeLog.android

diff --git a/gcc/ChangeLog.android b/gcc/ChangeLog.android
new file mode 100644
index 000..fc54522
--- /dev/null
+++ b/gcc/ChangeLog.android
@@ -0,0 +1,5 @@
+2011-12-13  H.J. Lu  
+
+   * config/linux-android.h (ANDROID_STARTFILE_SPEC): Use
+   crtbegin_so%O%s for -shared.
+   (ANDROID_ENDFILE_SPEC): Use crtend_so%O%s for -shared.
diff --git a/gcc/config/linux-android.h b/gcc/config/linux-android.h
index 94c5274..acbc662 100644
--- a/gcc/config/linux-android.h
+++ b/gcc/config/linux-android.h
@@ -53,8 +53,8 @@
   "%{!static: -ldl}"
 
 #define ANDROID_STARTFILE_SPEC \
-  "%{!shared:" \
+  "%{shared: crtbegin_so%O%s;:"
\
   "  %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}"
 
 #define ANDROID_ENDFILE_SPEC \
-  "%{!shared: crtend_android%O%s}"
+  "%{shared: crtend_so%O%s;: crtend_android%O%s}"
-- 
1.7.6.4