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

Re: Bug#433539: gcc-4.1: Final patch for profiling



reopen 433539
stop


On Fri, Aug 03, 2007 at 09:38:38PM -0400, Michael Casadevall wrote:
> Package: gcc-4.1
> Version: 4.1.2-13
> Followup-For: Bug #433539
> 
> As a follow up to my last email, I've updated my patch more, and now it
> properly handles profiling with -static and without.

Wrong.

> I also used it to build and profile hurd translators as staticially built
> binaries without a problem.

Wrong.  Definitely not with the patch you submitted and got included.


Sorry, if this sounds harsh, but you definitely did not build Hurd
translators (or anything else) statically with the patch you submitted.

We now have packages gcc-4.1 and gcc-4.2 in the Debian archives that are
unable to build any regular statically linked binaries at all (except for
applying GCC command line work-arounds).


> --- src/gcc/config/i386/gnu.h	2007-07-14 17:02:14.210000000 -0400
> +++ src/gcc/config/i386/gnu.h	2007-07-14 13:01:43.970000000 -0400
> @@ -34,8 +34,8 @@
>  #define STARTFILE_SPEC \
>    "%{!shared: \
>       %{!static: \
> -       %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
> -     %{static:crt0.o%s}} \
> +       %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt1.o%s}}} \
> +     %{static: %{pg:gcrt0.o%s} %{!pg:{%p:gcrt0.o%s} %{!p:crt0.o%s}}}} \
>     crti.o%s %{static:crtbeginT.o%s}\
>     %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"

This is invalid specs syntax -- at least for the designated use.  Instead
of ``{%p:gcrt0.o%s}'' it should read ``%{p:gcrt0.o%s}''.  Debian GCC
team: can you please change this (once more...) for gcc-4.1 and gcc-4.2?
Alternatively you could also use what has been committed here:
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5212#c11>.  Or even better:
I'll simply attach a patch that has this issue fixed.  Please install
that one into the gcc-4.1 and gcc-4.2 source packages, replacing the
existing file.


 Thomas
#! /bin/sh -e

# DP: Fix profiling on hurd-i386.

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        ;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0

--- gcc/config/i386/gnu.h	2007-07-14 17:02:14.210000000 -0400
+++ gcc/config/i386/gnu.h	2007-07-14 13:01:43.970000000 -0400
@@ -34,8 +34,8 @@
 #define STARTFILE_SPEC \
   "%{!shared: \
      %{!static: \
-       %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
-     %{static:crt0.o%s}} \
+       %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt1.o%s}}} \
+     %{static: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}}} \
    crti.o%s %{static:crtbeginT.o%s}\
    %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
 

Attachment: signature.asc
Description: Digital signature


Reply to: