Re: Other interesting mips breakage...

"John D. Baker" <[email protected]> Thu, 6 Feb 2014 12:18:56 -0600 (CST)
Newsgroups gmane.os.netbsd.ports.evbmips,gmane.os.netbsd.ports.mips.devel
Message-ID <[email protected]>
Here's what I had to do (so far) to get anything from pkgsrc to
compile/install on my Lemote YEELOONG.

In "mk/wrapper/transform-gcc":  Discard "-O[23s]" so compiler doesn't
die with "Bus Error".  Discard "-pthread" to get executable that
doesn't die with "Memory Fault" (SegFault).

In "mk/pkgformat/pkg/package.mk":  Add "-m ${MACHINE_ARCH}" to the
"su-real-package-install" target to override 'pkg_add' builtin default.

+Index: mk/wrapper/transform-gcc
+===================================================================
+RCS file: /cvsroot/pkgsrc/mk/wrapper/transform-gcc,v
+retrieving revision 1.29
+diff -u -b -r1.29 transform-gcc
+--- mk/wrapper/transform-gcc	31 Dec 2013 13:56:35 -0000	1.29
++++ mk/wrapper/transform-gcc	4 Feb 2014 13:35:17 -0000
+@@ -65,11 +65,9 @@
+ -mpush-args		|\
+ -mschedule=*		|\
+ -mieee-fp		|\
+--O[23s]			|\
+ -pedantic		|\
+ -pedantic-errors	|\
+ -pipe			|\
+--pthread		|\
+ -print-prog-name=*	|\
+ -print-search-dirs	|\
+ -S			|\
+@@ -121,6 +119,8 @@
+ -Wwrite-strings		) transform_pass ;;
+ 
+ # There are some packages suppressing all warnings. We don't want that.
++-O[23s]			|\
++-pthread		|\
+ -w			) transform_discard ;;
+ 
+ # Options specific to g++.
+Index: mk/pkgformat/pkg/package.mk
+===================================================================
+RCS file: /cvsroot/pkgsrc/mk/pkgformat/pkg/package.mk,v
+retrieving revision 1.3
+diff -u -b -r1.3 package.mk
+--- mk/pkgformat/pkg/package.mk	10 Aug 2013 06:05:57 -0000	1.3
++++ mk/pkgformat/pkg/package.mk	4 Feb 2014 13:35:46 -0000
+@@ -194,7 +194,7 @@
+ 	@${MV} ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS.tmp ${_PKG_DBDIR}/${PKGNAME:Q}/+CONTENTS
+ .else
+ 	${RUN} case ${_AUTOMATIC:Q}"" in					\
+-	[yY][eE][sS])	${PKG_ADD} -A ${STAGE_PKGFILE} ;;		\
+-	*)		${PKG_ADD} ${STAGE_PKGFILE} ;;			\
++	[yY][eE][sS])	${PKG_ADD} -A -m ${MACHINE_ARCH} ${STAGE_PKGFILE} ;;		\
++	*)		${PKG_ADD} -m ${MACHINE_ARCH} ${STAGE_PKGFILE} ;;			\
+ 	esac
+ .endif


With these, I was able to build and install "security/sudo" and "www/lynx"
(and they seem to work properly).  Still not good enough to build
"audio/mpg123" on my Lemote YEELOONG (compiler dies with "Bus Error" still).

--
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645