public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC 9.0.1 Status Report (2019-04-25)
@ 2019-04-25 18:38 Jakub Jelinek
  2019-04-25 21:32 ` Jonathan Wakely
  2019-04-30 10:37 ` [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken (was: GCC 9.0.1 Status Report (2019-04-25)) Thomas Schwinge
  0 siblings, 2 replies; 12+ messages in thread
From: Jakub Jelinek @ 2019-04-25 18:38 UTC (permalink / raw)
  To: gcc

Status
======

We have reached zero P1 regressions today and branches/gcc-9-branch has
been created;  GCC 9.1-rc1 will be built and announced likely tomorrow.
The branch is now frozen for blocking regressions and documentation
fixes only, all changes to the branch require a RM approval now.

If no show stoppers appear, we'd like to release 9.1 late next week,
or soon after that, if any important issues are discovered and
fixed, rc2 could be released next week.


Quality Data
============

Priority          #   Change from last report
--------        ---   -----------------------
P1                0   -  12
P2              154   -   4
P3               13   -  12
P4		140   +   2
P5		 25   +   1
--------        ---   -----------------------
Total P1-P3     167   -  28
Total		332   -  25


Previous Report
===============

https://gcc.gnu.org/ml/gcc/2019-03/msg00254.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: GCC 9.0.1 Status Report (2019-04-25)
  2019-04-25 18:38 GCC 9.0.1 Status Report (2019-04-25) Jakub Jelinek
@ 2019-04-25 21:32 ` Jonathan Wakely
  2019-04-30 10:37 ` [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken (was: GCC 9.0.1 Status Report (2019-04-25)) Thomas Schwinge
  1 sibling, 0 replies; 12+ messages in thread
From: Jonathan Wakely @ 2019-04-25 21:32 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: gcc

On Thu, 25 Apr 2019 at 19:38, Jakub Jelinek wrote:
>
> Status
> ======
>
> We have reached zero P1 regressions today and branches/gcc-9-branch has
> been created;  GCC 9.1-rc1 will be built and announced likely tomorrow.
> The branch is now frozen for blocking regressions and documentation
> fixes only, all changes to the branch require a RM approval now.

I'd like to make this small correction to the docs on gcc-9-branch:
https://gcc.gnu.org/ml/gcc-patches/2019-04/msg01013.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken (was: GCC 9.0.1 Status Report (2019-04-25))
  2019-04-25 18:38 GCC 9.0.1 Status Report (2019-04-25) Jakub Jelinek
  2019-04-25 21:32 ` Jonathan Wakely
@ 2019-04-30 10:37 ` Thomas Schwinge
  2019-04-30 10:48   ` Thomas Schwinge
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Schwinge @ 2019-04-30 10:37 UTC (permalink / raw)
  To: Ilya Verbin, Jakub Jelinek, gcc

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

Hi!

On Thu, 25 Apr 2019 20:38:21 +0200, Jakub Jelinek <jakub@redhat.com> wrote:
> branches/gcc-9-branch has
> been created;  GCC 9.1-rc1 will be built and announced likely tomorrow.

Yay!  \o/


I just again want to point to <https://gcc.gnu.org/PR87833> '[9/10
Regression] Intel MIC (emulated) offloading: "relocation [...] can not be
used when making a shared object; recompile with -fPIC"'.

This not being fixed means that Intel MIC (emulated) offloading will be
broken in the upcoming GCC 9 release.  As in the past several months
apparently nobody but me has run into this (or didn't bother to report
it), I thus again wonder whether anyone but me is still testing Intel MIC
(emulated) offloading, and/or there's no interest anymore in keeping this
functional?

My WIP patch/work around still works (but is still as WIP as it was
before).


Grüße
 Thomas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 658 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken (was: GCC 9.0.1 Status Report (2019-04-25))
  2019-04-30 10:37 ` [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken (was: GCC 9.0.1 Status Report (2019-04-25)) Thomas Schwinge
@ 2019-04-30 10:48   ` Thomas Schwinge
  2019-04-30 10:57     ` Jakub Jelinek
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Schwinge @ 2019-04-30 10:48 UTC (permalink / raw)
  To: Ilya Verbin, Jakub Jelinek, gcc

Hi!

Email to <ilya.verbin@intel.com> apparently is no longer gets delivered.
Is there anyone else from Intel who'd take over maintenance?


Grüße
 Thomas


On Tue, 30 Apr 2019 12:37:17 +0200, I wrote:
> Hi!
> 
> On Thu, 25 Apr 2019 20:38:21 +0200, Jakub Jelinek <jakub@redhat.com> wrote:
> > branches/gcc-9-branch has
> > been created;  GCC 9.1-rc1 will be built and announced likely tomorrow.
> 
> Yay!  \o/
> 
> 
> I just again want to point to <https://gcc.gnu.org/PR87833> '[9/10
> Regression] Intel MIC (emulated) offloading: "relocation [...] can not be
> used when making a shared object; recompile with -fPIC"'.
> 
> This not being fixed means that Intel MIC (emulated) offloading will be
> broken in the upcoming GCC 9 release.  As in the past several months
> apparently nobody but me has run into this (or didn't bother to report
> it), I thus again wonder whether anyone but me is still testing Intel MIC
> (emulated) offloading, and/or there's no interest anymore in keeping this
> functional?
> 
> My WIP patch/work around still works (but is still as WIP as it was
> before).
> 
> 
> Grüße
>  Thomas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken (was: GCC 9.0.1 Status Report (2019-04-25))
  2019-04-30 10:48   ` Thomas Schwinge
@ 2019-04-30 10:57     ` Jakub Jelinek
  2019-04-30 11:02       ` Thomas Schwinge
  0 siblings, 1 reply; 12+ messages in thread
From: Jakub Jelinek @ 2019-04-30 10:57 UTC (permalink / raw)
  To: Thomas Schwinge, Jan Hubicka; +Cc: Ilya Verbin, gcc

On Tue, Apr 30, 2019 at 12:47:54PM +0200, Thomas Schwinge wrote:
> Email to <ilya.verbin@intel.com> apparently is no longer gets delivered.
> Is there anyone else from Intel who'd take over maintenance?

As your patch is to LTO option handling, I think you want a review from
Honza.  At this point I'd lean towards fixing in GCC 10 and then backporting
to GCC 9.2.

	Jakub

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken (was: GCC 9.0.1 Status Report (2019-04-25))
  2019-04-30 10:57     ` Jakub Jelinek
@ 2019-04-30 11:02       ` Thomas Schwinge
  2019-04-30 11:31         ` Jakub Jelinek
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Schwinge @ 2019-04-30 11:02 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Ilya Verbin, gcc, Jan Hubicka

Hi Jakub!

On Tue, 30 Apr 2019 12:56:52 +0200, Jakub Jelinek <jakub@redhat.com> wrote:
> On Tue, Apr 30, 2019 at 12:47:54PM +0200, Thomas Schwinge wrote:
> > Email to <ilya.verbin@intel.com> apparently is no longer gets delivered.
> > Is there anyone else from Intel who'd take over maintenance?
> 
> As your patch is to LTO option handling, I think you want a review from
> Honza.

Well, I'm actually not asking for review of the WIP patch, but rather
looking for someone to take on ownership/maintenance of the functionality
of Intel MIC offloading.


> At this point I'd lean towards fixing in GCC 10 and then backporting
> to GCC 9.2.

Sure, that's all fine.


Grüße
 Thomas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken (was: GCC 9.0.1 Status Report (2019-04-25))
  2019-04-30 11:02       ` Thomas Schwinge
@ 2019-04-30 11:31         ` Jakub Jelinek
  2019-05-07  8:03           ` Hongtao Liu
  0 siblings, 1 reply; 12+ messages in thread
From: Jakub Jelinek @ 2019-04-30 11:31 UTC (permalink / raw)
  To: Thomas Schwinge, H.J. Lu, Hongtao Liu; +Cc: Ilya Verbin, gcc, Jan Hubicka

On Tue, Apr 30, 2019 at 01:02:40PM +0200, Thomas Schwinge wrote:
> Hi Jakub!
> 
> On Tue, 30 Apr 2019 12:56:52 +0200, Jakub Jelinek <jakub@redhat.com> wrote:
> > On Tue, Apr 30, 2019 at 12:47:54PM +0200, Thomas Schwinge wrote:
> > > Email to <ilya.verbin@intel.com> apparently is no longer gets delivered.
> > > Is there anyone else from Intel who'd take over maintenance?
> > 
> > As your patch is to LTO option handling, I think you want a review from
> > Honza.
> 
> Well, I'm actually not asking for review of the WIP patch, but rather
> looking for someone to take on ownership/maintenance of the functionality
> of Intel MIC offloading.

That would be indeed greatly appreciated.

	Jakub

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken (was: GCC 9.0.1 Status Report (2019-04-25))
  2019-04-30 11:31         ` Jakub Jelinek
@ 2019-05-07  8:03           ` Hongtao Liu
  2019-05-09 12:46             ` Ilya Verbin
  0 siblings, 1 reply; 12+ messages in thread
From: Hongtao Liu @ 2019-05-07  8:03 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Thomas Schwinge, H.J. Lu, Ilya Verbin, gcc, Jan Hubicka

On Tue, Apr 30, 2019 at 7:31 PM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Tue, Apr 30, 2019 at 01:02:40PM +0200, Thomas Schwinge wrote:
> > Hi Jakub!
> >
> > On Tue, 30 Apr 2019 12:56:52 +0200, Jakub Jelinek <jakub@redhat.com> wrote:
> > > On Tue, Apr 30, 2019 at 12:47:54PM +0200, Thomas Schwinge wrote:
> > > > Email to <ilya.verbin@intel.com> apparently is no longer gets delivered.
> > > > Is there anyone else from Intel who'd take over maintenance?
> > >
> > > As your patch is to LTO option handling, I think you want a review from
> > > Honza.
> >
> > Well, I'm actually not asking for review of the WIP patch, but rather
> > looking for someone to take on ownership/maintenance of the functionality
> > of Intel MIC offloading.
>
> That would be indeed greatly appreciated.
>
>         Jakub

I don't konw this guy ilya.verbin@intel.com.
Do you know him/her, H.J?

-- 
BR,
Hongtao

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken (was: GCC 9.0.1 Status Report (2019-04-25))
  2019-05-07  8:03           ` Hongtao Liu
@ 2019-05-09 12:46             ` Ilya Verbin
  2019-05-29 14:32               ` [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken Thomas Schwinge
  0 siblings, 1 reply; 12+ messages in thread
From: Ilya Verbin @ 2019-05-09 12:46 UTC (permalink / raw)
  To: Hongtao Liu; +Cc: GCC Development

Hi Hongtao,

I have left Intel 3 years ago. If you have any questions regarding MIC
offloading, you can reach me by iverbin@gmail.com

Hongtao Liu <crazylht@gmail.com>:
> I don't konw this guy ilya.verbin@intel.com.
> Do you know him/her, H.J?
>
> --
> BR,
> Hongtao

  || Ilya

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken
  2019-05-09 12:46             ` Ilya Verbin
@ 2019-05-29 14:32               ` Thomas Schwinge
  2019-05-29 15:50                 ` Jeff Law
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Schwinge @ 2019-05-29 14:32 UTC (permalink / raw)
  To: Ilya Verbin; +Cc: GCC Development, Hongtao Liu

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

Hi Ilya!

On Thu, 9 May 2019 15:46:06 +0300, Ilya Verbin <iverbin@gmail.com> wrote:
> I have left Intel 3 years ago. If you have any questions regarding MIC
> offloading, you can reach me by iverbin@gmail.com

We're (a) looking for somebody to step up as a maintainer for that, and
(b) that person to get active, and take ownership of
<https://gcc.gnu.org/PR87833>, and review the proposed patch,
<http://mid.mail-archive.com/20190502213457.20953-1-hjl.tools@gmail.com>.


Grüße
 Thomas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 658 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken
  2019-05-29 14:32               ` [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken Thomas Schwinge
@ 2019-05-29 15:50                 ` Jeff Law
  2019-11-11  9:13                   ` [8/9/10 " Thomas Schwinge
  0 siblings, 1 reply; 12+ messages in thread
From: Jeff Law @ 2019-05-29 15:50 UTC (permalink / raw)
  To: Thomas Schwinge, Ilya Verbin; +Cc: GCC Development, Hongtao Liu, H.J. Lu

On 5/29/19 8:32 AM, Thomas Schwinge wrote:
> Hi Ilya!
> 
> On Thu, 9 May 2019 15:46:06 +0300, Ilya Verbin <iverbin@gmail.com> wrote:
>> I have left Intel 3 years ago. If you have any questions regarding MIC
>> offloading, you can reach me by iverbin@gmail.com
> 
> We're (a) looking for somebody to step up as a maintainer for that, and
> (b) that person to get active, and take ownership of
> <https://gcc.gnu.org/PR87833>, and review the proposed patch,
> <http://mid.mail-archive.com/20190502213457.20953-1-hjl.tools@gmail.com>.
My question would be where in the world is the -fno-pie stuff coming
from.  It's also not clear where mkoffload is being called within c#5
(presumably via the linker plugin) AFAICT we don't get the command line
for that.  -v  or -Wl,-v probably would have helped.  It's difficult to
know if HJ's patch is correct or not given the missing bits of information.

But I'm willing to trust HJ here.  I'll ack the patch for the trunk.
You or HJ can go ahead and install it.

THe bigger question about the viability/usability of MIC is punted ;-)

jeff

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [8/9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken
  2019-05-29 15:50                 ` Jeff Law
@ 2019-11-11  9:13                   ` Thomas Schwinge
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Schwinge @ 2019-11-11  9:13 UTC (permalink / raw)
  To: gcc, gcc-patches, Jeff Law; +Cc: Hongtao Liu, H.J. Lu, Ilya Verbin


[-- Attachment #1.1: Type: text/plain, Size: 1935 bytes --]

Hi!

On 2019-05-29T09:50:42-0600, Jeff Law <law@redhat.com> wrote:
> On 5/29/19 8:32 AM, Thomas Schwinge wrote:
>> On Thu, 9 May 2019 15:46:06 +0300, Ilya Verbin <iverbin@gmail.com> wrote:
>>> I have left Intel 3 years ago. If you have any questions regarding MIC
>>> offloading, you can reach me by iverbin@gmail.com
>> 
>> We're (a) looking for somebody to step up as a maintainer for that, and

That's still unresolved.

At the 2019 GNU Tools Cauldron, we discussed this topic in the OMP BoF,
and decided that despite its unmaintained status, we shall try to keep
GCC's Intel MIC (emulated) offloading support functional (at least until
any more complicated problems arise), because it might be useful for
Jakub once a year or so, for testing OMP changes.


>> (b) that person to get active, and take ownership of
>> <https://gcc.gnu.org/PR87833>, and review the proposed patch,
>> <http://mid.mail-archive.com/20190502213457.20953-1-hjl.tools@gmail.com>.
> My question would be where in the world is the -fno-pie stuff coming
> from.  It's also not clear where mkoffload is being called within c#5
> (presumably via the linker plugin) AFAICT we don't get the command line
> for that.  -v  or -Wl,-v probably would have helped.  It's difficult to
> know if HJ's patch is correct or not given the missing bits of information.
>
> But I'm willing to trust HJ here.  I'll ack the patch for the trunk.
> You or HJ can go ahead and install it.

I too have not made an attempt to really understand this problem and
solution.  See attached; as posted by H.J.,
<http://mid.mail-archive.com/20190502213457.20953-1-hjl.tools@gmail.com>,
I have now committed "[PR87833] x86: Put -fPIC and -shared the last to
create offload image" to trunk in r278041, gcc-9-branch in r278042,
gcc-8-branch in r278043.


> THe bigger question about the viability/usability of MIC is punted ;-)


Grüße
 Thomas



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-PR87833-x86-Put-fPIC-and-shared-the-last-to-cr.trunk.patch --]
[-- Type: text/x-diff, Size: 2463 bytes --]

From 73e2538765507c373e1d7c14363094a2f6cf645a Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 11 Nov 2019 08:38:28 +0000
Subject: [PATCH] [PR87833] x86: Put -fPIC and -shared the last to create
 offload image

On x86, since -fPIC and -shared should be used to create offload image,
we put them the last to properly create offload image.

2019-11-11  H.J. Lu  <hjl.tools@gmail.com>

	PR target/87833
	* config/i386/intelmic-mkoffload.c (prepare_target_image): Put
	-fPIC and -shared the last to create offload image.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@278041 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog                        | 6 ++++++
 gcc/config/i386/intelmic-mkoffload.c | 5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ca0cebc20180..1b0145fbc787 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-11-11  H.J. Lu  <hjl.tools@gmail.com>
+
+	PR target/87833
+	* config/i386/intelmic-mkoffload.c (prepare_target_image): Put
+	-fPIC and -shared the last to create offload image.
+
 2019-11-11  Thomas Schwinge  <thomas@codesourcery.com>
 
 	* gimplify.c (gimplify_scan_omp_clauses): Assert 'offset2' instead
diff --git a/gcc/config/i386/intelmic-mkoffload.c b/gcc/config/i386/intelmic-mkoffload.c
index 2a3e912ee74f..0b12edc72c14 100644
--- a/gcc/config/i386/intelmic-mkoffload.c
+++ b/gcc/config/i386/intelmic-mkoffload.c
@@ -453,8 +453,6 @@ prepare_target_image (const char *target_compiler, int argc, char **argv)
   if (verbose)
     obstack_ptr_grow (&argv_obstack, "-v");
   obstack_ptr_grow (&argv_obstack, "-xlto");
-  obstack_ptr_grow (&argv_obstack, "-shared");
-  obstack_ptr_grow (&argv_obstack, "-fPIC");
   obstack_ptr_grow (&argv_obstack, opt1);
   for (int i = 1; i < argc; i++)
     {
@@ -466,6 +464,9 @@ prepare_target_image (const char *target_compiler, int argc, char **argv)
   if (!out_obj_filename)
     fatal_error (input_location, "output file not specified");
   obstack_ptr_grow (&argv_obstack, opt2);
+  /* NB: Put -fPIC and -shared the last to create shared library.  */
+  obstack_ptr_grow (&argv_obstack, "-fPIC");
+  obstack_ptr_grow (&argv_obstack, "-shared");
   obstack_ptr_grow (&argv_obstack, "-o");
   obstack_ptr_grow (&argv_obstack, target_so_filename);
   compile_for_target (&argv_obstack);
-- 
2.17.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0001-PR87833-x86-Put-fPIC-and-shared-the-las.gcc-9-branch.patch --]
[-- Type: text/x-diff, Size: 2492 bytes --]

From 22bf0cb640189880b683180d50b1e5b4b93e1fd9 Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 11 Nov 2019 08:39:10 +0000
Subject: [PATCH] [PR87833] x86: Put -fPIC and -shared the last to create
 offload image

On x86, since -fPIC and -shared should be used to create offload image,
we put them the last to properly create offload image.

2019-11-11  H.J. Lu  <hjl.tools@gmail.com>

	PR target/87833
	* config/i386/intelmic-mkoffload.c (prepare_target_image): Put
	-fPIC and -shared the last to create offload image.

Backport from trunk r278041.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@278042 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog                        | 7 +++++++
 gcc/config/i386/intelmic-mkoffload.c | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fc19dae278d4..8552b2a072fe 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2019-11-11  H.J. Lu  <hjl.tools@gmail.com>
+
+	Backport from trunk:
+	PR target/87833
+	* config/i386/intelmic-mkoffload.c (prepare_target_image): Put
+	-fPIC and -shared the last to create offload image.
+
 2019-11-11  Thomas Schwinge  <thomas@codesourcery.com>
 
 	Backport from trunk:
diff --git a/gcc/config/i386/intelmic-mkoffload.c b/gcc/config/i386/intelmic-mkoffload.c
index 2a3e912ee74f..0b12edc72c14 100644
--- a/gcc/config/i386/intelmic-mkoffload.c
+++ b/gcc/config/i386/intelmic-mkoffload.c
@@ -453,8 +453,6 @@ prepare_target_image (const char *target_compiler, int argc, char **argv)
   if (verbose)
     obstack_ptr_grow (&argv_obstack, "-v");
   obstack_ptr_grow (&argv_obstack, "-xlto");
-  obstack_ptr_grow (&argv_obstack, "-shared");
-  obstack_ptr_grow (&argv_obstack, "-fPIC");
   obstack_ptr_grow (&argv_obstack, opt1);
   for (int i = 1; i < argc; i++)
     {
@@ -466,6 +464,9 @@ prepare_target_image (const char *target_compiler, int argc, char **argv)
   if (!out_obj_filename)
     fatal_error (input_location, "output file not specified");
   obstack_ptr_grow (&argv_obstack, opt2);
+  /* NB: Put -fPIC and -shared the last to create shared library.  */
+  obstack_ptr_grow (&argv_obstack, "-fPIC");
+  obstack_ptr_grow (&argv_obstack, "-shared");
   obstack_ptr_grow (&argv_obstack, "-o");
   obstack_ptr_grow (&argv_obstack, target_so_filename);
   compile_for_target (&argv_obstack);
-- 
2.17.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: 0001-PR87833-x86-Put-fPIC-and-shared-the-las.gcc-8-branch.patch --]
[-- Type: text/x-diff, Size: 2492 bytes --]

From 38b44bd6947089744a525e61e499fda7975a7c7e Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 11 Nov 2019 08:39:32 +0000
Subject: [PATCH] [PR87833] x86: Put -fPIC and -shared the last to create
 offload image

On x86, since -fPIC and -shared should be used to create offload image,
we put them the last to properly create offload image.

2019-11-11  H.J. Lu  <hjl.tools@gmail.com>

	PR target/87833
	* config/i386/intelmic-mkoffload.c (prepare_target_image): Put
	-fPIC and -shared the last to create offload image.

Backport from trunk r278041.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@278043 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog                        | 7 +++++++
 gcc/config/i386/intelmic-mkoffload.c | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 29441ada5dd3..94eaf1bc624d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2019-11-11  H.J. Lu  <hjl.tools@gmail.com>
+
+	Backport from trunk:
+	PR target/87833
+	* config/i386/intelmic-mkoffload.c (prepare_target_image): Put
+	-fPIC and -shared the last to create offload image.
+
 2019-11-11  Thomas Schwinge  <thomas@codesourcery.com>
 
 	Backport from trunk:
diff --git a/gcc/config/i386/intelmic-mkoffload.c b/gcc/config/i386/intelmic-mkoffload.c
index b8f116446e63..008968e3e376 100644
--- a/gcc/config/i386/intelmic-mkoffload.c
+++ b/gcc/config/i386/intelmic-mkoffload.c
@@ -453,8 +453,6 @@ prepare_target_image (const char *target_compiler, int argc, char **argv)
   if (verbose)
     obstack_ptr_grow (&argv_obstack, "-v");
   obstack_ptr_grow (&argv_obstack, "-xlto");
-  obstack_ptr_grow (&argv_obstack, "-shared");
-  obstack_ptr_grow (&argv_obstack, "-fPIC");
   obstack_ptr_grow (&argv_obstack, opt1);
   for (int i = 1; i < argc; i++)
     {
@@ -466,6 +464,9 @@ prepare_target_image (const char *target_compiler, int argc, char **argv)
   if (!out_obj_filename)
     fatal_error (input_location, "output file not specified");
   obstack_ptr_grow (&argv_obstack, opt2);
+  /* NB: Put -fPIC and -shared the last to create shared library.  */
+  obstack_ptr_grow (&argv_obstack, "-fPIC");
+  obstack_ptr_grow (&argv_obstack, "-shared");
   obstack_ptr_grow (&argv_obstack, "-o");
   obstack_ptr_grow (&argv_obstack, target_so_filename);
   compile_for_target (&argv_obstack);
-- 
2.17.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 658 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-11-11  9:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-25 18:38 GCC 9.0.1 Status Report (2019-04-25) Jakub Jelinek
2019-04-25 21:32 ` Jonathan Wakely
2019-04-30 10:37 ` [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken (was: GCC 9.0.1 Status Report (2019-04-25)) Thomas Schwinge
2019-04-30 10:48   ` Thomas Schwinge
2019-04-30 10:57     ` Jakub Jelinek
2019-04-30 11:02       ` Thomas Schwinge
2019-04-30 11:31         ` Jakub Jelinek
2019-05-07  8:03           ` Hongtao Liu
2019-05-09 12:46             ` Ilya Verbin
2019-05-29 14:32               ` [9/10 Regression] [PR87833] Intel MIC (emulated) offloading still broken Thomas Schwinge
2019-05-29 15:50                 ` Jeff Law
2019-11-11  9:13                   ` [8/9/10 " Thomas Schwinge

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).