Hi!

On Wed, 8 Jul 2015 18:13:56 +0300, Ilya Verbin <iver...@gmail.com> wrote:
> 
> > On 8 июля 2015 г., at 17:16, Thomas Schwinge <tho...@codesourcery.com> 
> > wrote:
> > With recent GCC trunk sources, builds of the Intel MIC Offload Plugin
> > fail as follows: [...]

> > [...] -- OK to commit the following?

> Ok to me, thanks.

Committed in r225562:

commit cacef506e4205bac13a0dd1de238d1a8cc78af28
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed Jul 8 15:47:59 2015 +0000

    liboffloadmic plugin: Address -Wnarrowing diagnostics
    
        libtool: compile:  [...]/build-gcc/./gcc/xg++ [...] -c 
[...]/source-gcc/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp [...]
        In file included from 
[...]/source-gcc/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp:40:0:
        
[...]/install/offload-x86_64-intelmicemul-linux-gnu/lib/gcc/x86_64-intelmicemul-linux-gnu/6.0.0/include/main_target_image.h:8628:1:
 error: narrowing conversion of '192' from 'int' to 'char' inside { } 
[-Wnarrowing]
         };
         ^
        
[...]/install/offload-x86_64-intelmicemul-linux-gnu/lib/gcc/x86_64-intelmicemul-linux-gnu/6.0.0/include/main_target_image.h:8628:1:
 error: narrowing conversion of '192' from 'int' to 'char' inside { } 
[-Wnarrowing]
        
[...]/install/offload-x86_64-intelmicemul-linux-gnu/lib/gcc/x86_64-intelmicemul-linux-gnu/6.0.0/include/main_target_image.h:8628:1:
 error: narrowing conversion of '164' from 'int' to 'char' inside { } 
[-Wnarrowing]
        [many more]
    
        liboffloadmic/
        * plugin/Makefile.am (main_target_image.h): Change type of data
        member in struct MainTargetImage to uint8_t.
        * plugin/Makefile.in: Regenerate.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225562 
138bc75d-0d04-0410-961f-82ee72b054a4
---
 liboffloadmic/ChangeLog          |    6 ++++++
 liboffloadmic/plugin/Makefile.am |    2 +-
 liboffloadmic/plugin/Makefile.in |    2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git liboffloadmic/ChangeLog liboffloadmic/ChangeLog
index 01fb9f4..b0f9e90 100644
--- liboffloadmic/ChangeLog
+++ liboffloadmic/ChangeLog
@@ -1,3 +1,9 @@
+2015-07-08  Thomas Schwinge  <tho...@codesourcery.com>
+
+       * plugin/Makefile.am (main_target_image.h): Change type of data
+       member of struct MainTargetImage to uint8_t.
+       * plugin/Makefile.in: Regenerate.
+
 2015-05-13  Michael Haubenwallner  <michael.haubenwall...@ssi-schaefer.com>
 
        * Makefile.in: Regenerated with automake-1.11.6.
diff --git liboffloadmic/plugin/Makefile.am liboffloadmic/plugin/Makefile.am
index a814f0c..19d69ab 100644
--- liboffloadmic/plugin/Makefile.am
+++ liboffloadmic/plugin/Makefile.am
@@ -69,7 +69,7 @@ main_target_image.h: offload_target_main
        @echo "struct MainTargetImage {" >> $@
        @echo "  int64_t size;" >> $@
        @echo "  char name[sizeof \"offload_target_main\"];" >> $@
-       @echo "  char data[image_size];" >> $@
+       @echo "  uint8_t data[image_size];" >> $@
        @echo "};" >> $@
        @echo "extern \"C\" const MainTargetImage main_target_image = {" >> $@
        @echo "  image_size, \"offload_target_main\"," >> $@
diff --git liboffloadmic/plugin/Makefile.in liboffloadmic/plugin/Makefile.in
index 6f7eec9..19a1a96 100644
--- liboffloadmic/plugin/Makefile.in
+++ liboffloadmic/plugin/Makefile.in
@@ -715,7 +715,7 @@ main_target_image.h: offload_target_main
        @echo "struct MainTargetImage {" >> $@
        @echo "  int64_t size;" >> $@
        @echo "  char name[sizeof \"offload_target_main\"];" >> $@
-       @echo "  char data[image_size];" >> $@
+       @echo "  uint8_t data[image_size];" >> $@
        @echo "};" >> $@
        @echo "extern \"C\" const MainTargetImage main_target_image = {" >> $@
        @echo "  image_size, \"offload_target_main\"," >> $@


Thanks for the explanation:

> The plugin consists of 2 parts: offload_target_main is a target part, which 
> is embedded into the host part (libgomp plugin itself). Target part is linked 
> with liboffloadmic_target.so and host part is linked with 
> liboffloadmic_host.so. Both offload_target_main and liboffloadmic_target.so 
> are compiled by the target compiler during its build.
> 
> As for xxd, I've found its usage in some Makefile inside gcc tree, so I 
> thought it's ok to use it.


Grüße,
 Thomas

Attachment: pgpIlKlIO2UeJ.pgp
Description: PGP signature

Reply via email to