emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#8880: closed (Support for portland compilers in de


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#8880: closed (Support for portland compilers in depcomp?)
Date: Thu, 02 Aug 2012 09:56:02 +0000

Your message dated Thu, 02 Aug 2012 11:47:46 +0200
with message-id <address@hidden>
and subject line Re: bug#8880: depcomp for Portland Group Compilers: get rid of 
file locking hack?
has caused the debbugs.gnu.org bug report #8880,
regarding Support for portland compilers in depcomp?
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
8880: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8880
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Support for portland compilers in depcomp? Date: Thu, 16 Jun 2011 09:52:27 -0700

I’m using automake 1.11.1 and I was puzzled why “checking dependency style of pgcc” would result in “none”.  It’s a fairly modern compiler, right?  I dug a little deeper.  It  looks like pgcc has some options for generating Makefile output.

 

$ pgcc –V

 

pgcc 11.2-0 64-bit target on x86-64 Linux -tp k8e

Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.

Copyright 2000-2011, STMicroelectronics, Inc.  All Rights Reserved.

 

Here’s the output from “man pgcc”:

       -M     Generate a list of make dependences and print them to stdout.

       -MD    Generate a list of make dependences and print them to the file

              file.d, where file is the root name of the file under

              compilation.

 

       -MM    Generate a list of make dependences and print them to stdout;

              ignore system includes.

 

       -MMD   Generate a list of make dependences and print them to the file

              file.d, where file is the root name of the file under

              compilation. Ignore system includes.

 

It doesn’t look like pgcc has anything fancier or more useful than that, for example I didn’t notice any -MF option.  I looked at depcomp and didn’t see any existing depmode for the -MD option alone.   Also, based on testing the output of pgcc, it looks like -MD creates the file.d based on the basename of the compiled file and will ignore subdirectories.  I also noticed that the file.d output wrapped long lines.  So I pieced together some of the other depmode cases within depcomp and came up with the following case:

 

pgcc)

  # Portland's C compiler understands `-MD'.

  # Will always output deps to `file.d' where file is the root name of the

  # file under compilation, even if file resides in a subdirectory.

  # pgcc 10.2 will output

  #    foo.o: sub/foo.c sub/foo.h

  # and will wrap long lines using \ :

  #    foo.o: sub/foo.c ... \

  #     sub/foo.h ... \

  #     ...

  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`

  test "x$dir" = "x$object" && dir=

  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`

  tmpdepfile="$base.d"

  "$@" -MD

  stat=$?

  if test $stat -eq 0; then :

  else

    rm -f "$tmpdepfile"

    exit $stat

  fi

  rm -f "$depfile"

  # Each line is of the form `foo.o: dependent.h',

  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.

  # Do two passes, one to just change these to

  # `$object: dependent.h' and one to simply `dependent.h:'.

  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"

  # Some versions of the HPUX 10.20 sed can't process this invocation

  # correctly.  Breaking it into two sed invocations is a workaround.

  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |

    sed -e 's/$/ :/' >> "$depfile"

  rm -f "$tmpdepfile"

  ;;

 

So does my hack seem legitimate?  I tried it on my project (which also uses libtool) and it appeared to do the right thing.  Is there any way to get this kind of support for Portland compilers into automake?  Thanks.

__________________________________________________
Jeff Daily
Scientist
DATA INTENSIVE SCIENTIFIC COMPUTING

Pacific Northwest National Laboratory
902 Battelle Boulevard
P.O. Box 999, MSIN K7-90
Richland, WA  99352 USA
Tel:  509-372-6548
Fax: 509-372-4720
address@hidden
www.pnnl.gov

 

 

 


--- End Message ---
--- Begin Message --- Subject: Re: bug#8880: depcomp for Portland Group Compilers: get rid of file locking hack? Date: Thu, 02 Aug 2012 11:47:46 +0200
On 07/31/2012 09:31 PM, Stefano Lattarini wrote:
>
> On 07/31/2012 09:17 PM, Dave Goodell wrote:
>>
>> In the meantime, I propose pushing the original patch (plus your
>> formatting fixup) and then revisiting the "-MD,asdf.d" approach
>> and tests afterwards.  Does that sound reasonable?
>>
> Absolutely.  I want to have the pgcc support merged in before 1.12.3
> is released, so I will merge your original patch in the next days.
> Follow-up improvements (if any) can easily be merged later.
> 
Done now.  I'm finally closing this bug report.

Thanks,
  Stefano


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]