Port-amd64 archive

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

PR 45814: changing x86/lock.h

Any opinions on the suggested change here?
(I'm not subscribed to port-i386, please cc me)

----- Forwarded message from noud4%home.nl@localhost -----

Date: Tue, 10 Jan 2012 19:00:00 +0000 (UTC)
From: noud4%home.nl@localhost
To: pkg-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, 
Subject: pkg/45814: lang/gcc45 doesn't build on 5.99.5x/i386

>Number:         45814
>Category:       pkg
>Synopsis:       lang/gcc45 doesn't build on 5.99.5x/i386
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 10 19:00:00 +0000 2012
>Originator:     B.ICT A.P. deBROUWER Jr.
>Release:        5.99.59
NetBSD 5.99.59 NetBSD 5.99.59 (MONOLITHIC) #0: Tue Dec 27 01:19:12 
UTC 2011  
am running nbsd/i386 on amd64 hw.
am able to build gcc45 on 5.1 and pkgsrc 10Q4 as well as pkgsrc-current.

Using NetBSD 5.99.55 5.99.56 5.99.59/i386 with pkgsrc-current (HEAD)
i can't build gcc45 gcc46 nor wip/gcc43 nor wip/gcc47.
(first pkgsrc-current i did try was in Oct.)
(gcc44 and lower does build.)

Whenever i tried to build (unpatched) got:

if [ x"-fpic" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g -fkeep-inline-functions 
-I/obj/lang/gcc45/work/.buildlink/include -I/usr/include -I/usr/pkg/include -I. 
-I/obj/lang/gcc45/work/gcc-4.5.3/libiberty/../include  -W -Wall -Wwrite-strings 
-Wc++-compat -Wstrict-prototypes -pedantic  -fpic 
/obj/lang/gcc45/work/gcc-4.5.3/libiberty/physmem.c -o pic/physmem.o; \
else true; fi
/usr/include/x86/lock.h: Assembler messages:
/usr/include/x86/lock.h:108: Error: bad register name `%sil'
gmake[3]: *** [physmem.o] Error 1
gmake[3]: Leaving directory `/obj/lang/gcc45/work/obj/libiberty'
gmake[2]: *** [all-stage1-libiberty] Error 2
gmake[2]: Leaving directory `/obj/lang/gcc45/work/obj'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/obj/lang/gcc45/work/obj'
gmake: *** [all] Error 2
*** Error code 2

If i do patch conform below i get a build done.
I suspect it has to be patched whole different(?) and am able to
supply a test-build in i386 when needed/up-on request.
install nbsd current/i386 & pkgsrc
cd lang/gcc45 && make
inspired by: http://mapopa.blogspot.com/2010/07/error-bad-register-name-sil.html

--- /usr/include/x86/lock.h.orig        2011-10-31 22:34:14.000000000 +0000
+++ /usr/include/x86/lock.h     2011-11-01 10:39:57.000000000 +0000
@@ -106,8 +106,8 @@
        val = __SIMPLELOCK_LOCKED;
        __asm volatile ("xchgb %0,(%2)" : 
-           "=r" (val)
-           :"0" (val), "r" (lockp));
+           "=q" (val)
+           :"0" (val), "q" (lockp));
        return val == __SIMPLELOCK_UNLOCKED;

----- End forwarded message -----

Home | Main Index | Thread Index | Old Index