This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Fix intelmic-mkoffload.c if the temp path contains a '-'


Hopefully CC'ing the right people...

> -----Original Message-----
> From: Hahnfeld, Jonas
> Sent: Thursday, August 20, 2015 12:25 PM
> To: 'gcc-patches@gcc.gnu.org'
> Subject: Fix intelmic-mkoffload.c if the temp path contains a '-'
> 
> Hi all,
> 
> during my test of OpenMP 4.0 offloading features I have found a bug in
> intelmic-mkoffload.c when the temp path contains a '-'.
> objcopy will in this case replace it with a '_' which wasn't reflected in
> the original code and resulted in a link error of the symbols
> '__offload_image_intelmic_start' and '__offload_image_intelmic_end'.
> 
> This is my first contribution, so just reply if anything is wrong and I'll
> happily fix it.
> 
> Greetings,
> Jonas
> 
> --
> Jonas Hahnfeld, MATSE-Auszubildender
> 
> IT Center
> Group: High Performance Computing
> Division: Computational Science and Engineering
> RWTH Aachen University
> Seffenter Weg 23
> D 52074  Aachen (Germany)
> Hahnfeld@itc.rwth-aachen.de
> www.itc.rwth-aachen.de

>From git-format-patch:

>From 884b6199179e7a604474bc6a828a6861d3ff4501 Mon Sep 17 00:00:00 2001
From: Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>
Date: Thu, 20 Aug 2015 12:13:55 +0200
Subject: [PATCH] Fix intelmic-mkoffload.c if the temp path contains a '-'

2015-08-20  Jonas Hahnfeld  <Hahnfeld@itc.rwth-aachen.de>

	* intelmic-mkoffload.c (prepare_target_image): Fix if the temp path
	contains a '-'.
---
 gcc/config/i386/intelmic-mkoffload.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gcc/config/i386/intelmic-mkoffload.c
b/gcc/config/i386/intelmic-mkoffload.c
index ca15868..c9327cf 100644
--- a/gcc/config/i386/intelmic-mkoffload.c
+++ b/gcc/config/i386/intelmic-mkoffload.c
@@ -460,7 +460,7 @@ prepare_target_image (const char *target_compiler, int
argc, char **argv)
   for (size_t i = 0; i <= symbol_name_len; i++)
     {
       char c = target_so_filename[i];
-      if ((c == '/') || (c == '.'))
+      if ((c == '/') || (c == '.') || (c == '-'))
 	c = '_';
       symbol_name[i] = c;
     }
-- 
1.7.1

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]