On 09.07.19 23:35, Matthias Klose wrote:
> On 08.07.19 23:19, Matthias Klose wrote:
>> On 14.06.19 15:09, Gaius Mulley wrote:
>>>
>>> Hello,
>>>
>>> here is version two of the patches which introduce Modula-2 into the
>>> GCC trunk.  The patches include:
>>>
>>>   (*)  a patch to allow all front ends to register a lang spec function.
>>>        (included are patches for all front ends to provide an empty
>>>         callback function).
>>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>>        built using GCC Makefile and friends.
>>>
>>> The compressed tarball includes:
>>>
>>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>>        Including the need for registering lang spec functions.
>>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>>        the gm2 driver is built and can understands --version).
>>>
>>> These patches have been re-written after taking on board the comments
>>> found in this thread:
>>>
>>>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>>>
>>> it is a revised patch set from:
>>>
>>>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>>>
>>> I've run make bootstrap and run the regression tests on trunk and no
>>> extra failures occur for all languages touched in the ChangeLog.
>>>
>>> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
>>> with amd64/arm64/i386) - these patches are currently simply for the
>>> driver to minimise the patch size.  There are also > 1800 tests in a
>>> dejagnu testsuite for gm2 which can be included at some future time.
>>
>> I had a look at the GCC 9 version of the patches, with a build including a 
>> make
>> install. Some comments:
> 
> [...]
> 
>>  - The internal tools in the gcclibdir are installed twice, with
>>    both vanilla names and prefixed/suffixed names.
>> The installed tree:
>>
>> ./usr/bin
>> ./usr/bin/x86_64-linux-gnu-gm2-9
>> ./usr/bin/x86_64-linux-gnu-gm2m-9
>> ./usr/lib/gcc/x86_64-linux-gnu
>> ./usr/lib/gcc/x86_64-linux-gnu/9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/cc1gm2
>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2l
>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lcc
>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lgen
>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lorder
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-cc1gm2-9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2l-9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lcc-9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lgen-9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lorder-9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2m-9
> 
> With a fresh build, configured with
> 
>          --program-suffix=-9
>          --program-prefix=x86_64-linux-gnu-
> 
> the latter set of internal binaries is installed, while I would expect just 
> the
> un-pre/post-fixed tool names.

fixed by the attached patch.



diff --git a/gcc-versionno/gcc/gm2/Make-lang.in b/gcc-versionno/gcc/gm2/Make-lang.in
index 6fc4ee84..81f5cbbc 100644
--- a/gcc-versionno/gcc/gm2/Make-lang.in
+++ b/gcc-versionno/gcc/gm2/Make-lang.in
@@ -373,12 +373,11 @@ gm2.install-common: installdirs $(GM2_LINK_TOOLS_BOOT) \
           chmod a+x $(DESTDIR)$(bindir)/$(GM2_INSTALL_NAME)$(exeext); \
           for tool in stage1/gm2/cc1gm2$(exeext) \
                       $(GM2_LINK_TOOLS_BOOT) stage1/gm2/gm2m$(exeext) ; do \
-            toolbase=`basename $$tool` ; \
-            tool_transformed_name=`echo $$toolbase|sed '$(program_transform_name)'`; \
+            tool_name=`basename $$tool` ; \
             if [ -f $$tool ]; then \
-              rm -f $(DESTDIR)$(libexecsubdir)/$$tool_transformed_name; \
-              $(INSTALL_PROGRAM) $$tool $(DESTDIR)$(libexecsubdir)/$$tool_transformed_name; \
-              chmod a+x $(DESTDIR)$(libexecsubdir)/$$tool_transformed_name; \
+              rm -f $(DESTDIR)$(libexecsubdir)/$$tool_name; \
+              $(INSTALL_PROGRAM) $$tool $(DESTDIR)$(libexecsubdir)/$$tool_name; \
+              chmod a+x $(DESTDIR)$(libexecsubdir)/$$tool_name; \
             else \
               echo "odd cannot find $$tool" ; \
             fi ; \

Reply via email to