tag 676775 + unreproducible
thanks

On Sat, Jun 09, 2012 at 12:47:41PM +0400, Michael Tokarev wrote:
> Package: openbios-ppc
> Version: 1.0+svn1047-1
> Severity: serious
> 
> The package fails to build from source, on either squeeze or wheezy.
> This is because of wrong code in config/scripts/switch-arch:
> 
> select_prefix()
> {
>     for TARGET in ${1}-linux-gnu- ${1}-linux- ${1}-elf- ${1}-eabi-
>     do
>         if type ${TARGET}gcc > /dev/null 2>&1
>         then
>             return
>         fi
>     done
>     if [ "$ARCH" = "$HOSTARCH" ]; then
>         return
>     fi
>     echo "ERROR: no ${1} cross-compiler found !" 1>&2
>     exit 1
> }
> 
> On a powerpc debian install of either squeeze or wheezy, there's
> powerpc-linux-gnu-gcc (which is just a symlink to gcc), but no
> powerpc-linux-gnu-{as,ld,ranlib,strip}.  Yet, based on the code
> above, the script is setting TARGET variable to powerpc-linux-gnu-,
> which gets written to obj-ppc/config.mak.
> 
> In squeeze backport of openbios-ppc package I worked around
> this by setting TARGET= when calling make from debian/rules
> to build stuff in obj-ppc:
> 
>         cd obj-ppc && $(MAKE) all TARGET=
> 
> Proper fix, I think, is to swap for-loop and if statement in
> the above function, select_prefix, to test for ARCH being
> the same as HOSTARCH before other variants.
> 
> Now I wonder how this package has been built to be uploaded
> to debian...
> 

I am not able to reproduce the issue. I have tried on two different
machines, and they are not using the prefix at all:

| gcc -O2 -g -DFCOMPILER -DBOOTSTRAP -USWAP_ENDIANNESS 
-DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -Wall -Wredundant-decls -Wshadow 
-Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wundef 
-Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes 
-Wnested-externs -W -MMD -MP -MT host/kernel/dict.o -MF 'host/kernel/dict.d' 
-I../include -I../kernel -I../kernel/include -I./target/include -c -o 
host/kernel/dict.o ../kernel/dict.c
[...]
| ar cru libgcc.a target/libgcc/ashldi3.o target/libgcc/ashrdi3.o 
target/libgcc/__lshrdi3.o target/libgcc/__divdi3.o target/libgcc/__udivdi3.o 
target/libgcc/__udivmoddi4.o target/libgcc/__umoddi3.o 
target/libgcc/crtsavres.o; ranlib libgcc.a
| ld --warn-common -N -T ../arch/ppc/qemu/ldscript -o openbios-qemu.elf.nostrip 
--whole-archive target/arch/ppc/qemu/start.o target/arch/ppc/timebase.o 
libqemu.a libbootstrap.a libopenbios.a libpackages.a libdrivers.a libfs.a 
liblibc.a libgcc.a
| nm openbios-qemu.elf.nostrip | sort > ./openbios-qemu.syms
| strip openbios-qemu.elf.nostrip -o openbios-qemu.elf

This is on both squeeze and sid.

Aurelien

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to