CVS commit: src/sys/net

2013-08-04 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sun Aug  4 07:05:15 UTC 2013

Modified Files:
src/sys/net: if_ecosubr.c

Log Message:
Fix build failed, if undef INET.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/net/if_ecosubr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_ecosubr.c
diff -u src/sys/net/if_ecosubr.c:1.37 src/sys/net/if_ecosubr.c:1.38
--- src/sys/net/if_ecosubr.c:1.37	Sat Jun 29 21:06:58 2013
+++ src/sys/net/if_ecosubr.c	Sun Aug  4 07:05:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ecosubr.c,v 1.37 2013/06/29 21:06:58 rmind Exp $	*/
+/*	$NetBSD: if_ecosubr.c,v 1.38 2013/08/04 07:05:15 kiyohara Exp $	*/
 
 /*-
  * Copyright (c) 2001 Ben Harris
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_ecosubr.c,v 1.37 2013/06/29 21:06:58 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_ecosubr.c,v 1.38 2013/08/04 07:05:15 kiyohara Exp $);
 
 #include opt_inet.h
 
@@ -355,8 +355,9 @@ eco_input(struct ifnet *ifp, struct mbuf
 {
 	struct ifqueue *inq;
 	struct eco_header ehdr, *eh;
-	int s, i;
+	int s;
 #ifdef INET
+	int i;
 	struct arphdr *ah;
 	struct eco_arp *ecah;
 	struct mbuf *m1;
@@ -464,7 +465,9 @@ eco_input(struct ifnet *ifp, struct mbuf
 		printf(%s: unknown port stn %s port 0x%02x ctl 0x%02x\n,
 		ifp-if_xname, eco_sprintf(eh-eco_shost),
 		eh-eco_port, eh-eco_control);
+#ifdef INET
 	drop:
+#endif
 		m_freem(m);
 		return;
 	}



CVS commit: src/distrib/sets/lists/debug

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  4 07:11:59 UTC 2013

Removed Files:
src/distrib/sets/lists/debug: md.evbarm md.evbarm.armeb

Log Message:
These aren't needed anymore (everything is in ad.arm).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/distrib/sets/lists/debug/md.evbarm \
src/distrib/sets/lists/debug/md.evbarm.armeb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/debug

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  4 07:20:34 UTC 2013

Removed Files:
src/distrib/sets/lists/debug: md.acorn32 md.cats md.netwinder

Log Message:
Not needed, either empty or contents in ad.arm


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/distrib/sets/lists/debug/md.acorn32 \
src/distrib/sets/lists/debug/md.cats \
src/distrib/sets/lists/debug/md.netwinder

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/file/dist/magic/magdir

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  4 07:49:07 UTC 2013

Modified Files:
src/external/bsd/file/dist/magic/magdir: elf

Log Message:
Print out BE8 and LE8 for arm elf


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/file/dist/magic/magdir/elf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/file/dist/magic/magdir/elf
diff -u src/external/bsd/file/dist/magic/magdir/elf:1.6 src/external/bsd/file/dist/magic/magdir/elf:1.7
--- src/external/bsd/file/dist/magic/magdir/elf:1.6	Sat Mar 23 16:23:46 2013
+++ src/external/bsd/file/dist/magic/magdir/elf	Sun Aug  4 07:49:07 2013
@@ -109,6 +109,8 @@
 4	byte		1
 36	lelong0xff00	0x0400	EABI4
 36	lelong0xff00	0x0500	EABI5
+36	lelong		0x0080	BE8
+36	lelong		0x0040	LE8
 18	leshort		41		Alpha,
 18	leshort		0xa390		IBM S/390 (obsolete),
 18	leshort		42		Renesas SH,



CVS commit: src/games/cgram

2013-08-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Aug  4 07:55:09 UTC 2013

Modified Files:
src/games/cgram: cgram.6

Log Message:
Add RCS Id.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/games/cgram/cgram.6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/cgram/cgram.6
diff -u src/games/cgram/cgram.6:1.1 src/games/cgram/cgram.6:1.2
--- src/games/cgram/cgram.6:1.1	Sun Aug  4 05:42:47 2013
+++ src/games/cgram/cgram.6	Sun Aug  4 07:55:09 2013
@@ -1,3 +1,4 @@
+.\ $NetBSD: cgram.6,v 1.2 2013/08/04 07:55:09 wiz Exp $
 .\
 .\ Copyright (c) 2004, 2013 The NetBSD Foundation, Inc.
 .\ All rights reserved.



CVS commit: src/tests/fs/vfs

2013-08-04 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Aug  4 11:02:02 UTC 2013

Modified Files:
src/tests/fs/vfs: t_io.c

Log Message:
tests for i/o-after-unlink


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/fs/vfs/t_io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/fs/vfs/t_io.c
diff -u src/tests/fs/vfs/t_io.c:1.11 src/tests/fs/vfs/t_io.c:1.12
--- src/tests/fs/vfs/t_io.c:1.11	Wed Jun 12 12:08:08 2013
+++ src/tests/fs/vfs/t_io.c	Sun Aug  4 11:02:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_io.c,v 1.11 2013/06/12 12:08:08 pooka Exp $	*/
+/*	$NetBSD: t_io.c,v 1.12 2013/08/04 11:02:02 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -168,6 +168,60 @@ shrinkfile(const atf_tc_t *tc, const cha
 	FSTEST_EXIT();
 }
 
+#define TBSIZE 9000
+static void
+read_after_unlink(const atf_tc_t *tc, const char *mp)
+{
+	char buf[TBSIZE], buf2[TBSIZE];
+	int fd;
+
+	FSTEST_ENTER();
+
+	/* create file and put some content into it */
+	RL(fd = rump_sys_open(file, O_RDWR|O_CREAT, 0666));
+	memset(buf, 'D', TBSIZE);
+	ATF_REQUIRE_EQ(rump_sys_write(fd, buf, TBSIZE), TBSIZE);
+	rump_sys_close(fd);
+
+	/* flush buffers from UBC to file system */
+	ATF_REQUIRE_ERRNO(EBUSY, rump_sys_unmount(mp, 0) == -1);
+
+	RL(fd = rump_sys_open(file, O_RDWR));
+	RL(rump_sys_unlink(file));
+
+	ATF_REQUIRE_EQ(rump_sys_read(fd, buf2, TBSIZE), TBSIZE);
+	ATF_REQUIRE_EQ(memcmp(buf, buf2, TBSIZE), 0);
+	rump_sys_close(fd);
+
+	FSTEST_EXIT();
+}
+
+static void
+wrrd_after_unlink(const atf_tc_t *tc, const char *mp)
+{
+	int value = 0x11;
+	int v2;
+	int fd;
+
+	FSTEST_ENTER();
+
+	RL(fd = rump_sys_open(file, O_RDWR|O_CREAT, 0666));
+	RL(rump_sys_unlink(file));
+
+	RL(rump_sys_pwrite(fd, value, sizeof(value), 654321));
+
+	/*
+	 * We can't easily invalidate the buffer since we hold a
+	 * reference, but try to get them to flush anyway.
+	 */
+	RL(rump_sys_fsync(fd));
+	RL(rump_sys_pread(fd, v2, sizeof(v2), 654321));
+	rump_sys_close(fd);
+
+	ATF_REQUIRE_EQ(value, v2);
+	FSTEST_EXIT();
+}
+
 ATF_TC_FSAPPLY(holywrite, create a sparse file and fill hole);
 ATF_TC_FSAPPLY(extendfile, check that extending a file works);
 ATF_TC_FSAPPLY(extendfile_append, check that extending a file works 
@@ -176,6 +230,8 @@ ATF_TC_FSAPPLY(overwrite512, write a 51
 ATF_TC_FSAPPLY(overwrite64k, write a 64k byte file twice);
 ATF_TC_FSAPPLY(overwrite_trunc, write 64k + truncate + rewrite);
 ATF_TC_FSAPPLY(shrinkfile, shrink file);
+ATF_TC_FSAPPLY(read_after_unlink, contents can be read off disk after unlink);
+ATF_TC_FSAPPLY(wrrd_after_unlink, file can be written and read after unlink);
 
 ATF_TP_ADD_TCS(tp)
 {
@@ -187,6 +243,8 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_FSAPPLY(overwrite64k);
 	ATF_TP_FSAPPLY(overwrite_trunc);
 	ATF_TP_FSAPPLY(shrinkfile);
+	ATF_TP_FSAPPLY(read_after_unlink);
+	ATF_TP_FSAPPLY(wrrd_after_unlink);
 
 	return atf_no_error();
 }



CVS commit: src/sys/rump/librump/rumpvfs

2013-08-04 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Aug  4 11:09:55 UTC 2013

Modified Files:
src/sys/rump/librump/rumpvfs: rumpfs.c

Log Message:
Use standard file-is-valid-until-last-reference-is-dropped semantics
for file contents.

via Justin Cormack  valgrind on github


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/rump/librump/rumpvfs/rumpfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpvfs/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.117 src/sys/rump/librump/rumpvfs/rumpfs.c:1.118
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.117	Fri Jun 14 05:54:04 2013
+++ src/sys/rump/librump/rumpvfs/rumpfs.c	Sun Aug  4 11:09:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpfs.c,v 1.117 2013/06/14 05:54:04 pooka Exp $	*/
+/*	$NetBSD: rumpfs.c,v 1.118 2013/08/04 11:09:55 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.117 2013/06/14 05:54:04 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.118 2013/08/04 11:09:55 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -1079,10 +1079,6 @@ rump_vop_remove(void *v)
 	if (rn-rn_flags  RUMPNODE_ET_PHONE_HOST)
 		return EOPNOTSUPP;
 
-	if (vp-v_type == VREG) {
-		rump_hyperfree(rn-rn_data, rn-rn_dlen);
-	}
-
 	freedir(rnd, cnp);
 	rn-rn_flags |= RUMPNODE_CANRECLAIM;
 
@@ -1668,6 +1664,11 @@ rump_vop_reclaim(void *v)
 	vp-v_data = NULL;
 
 	if (rn-rn_flags  RUMPNODE_CANRECLAIM) {
+		if (vp-v_type == VREG  rn-rn_data) {
+			rump_hyperfree(rn-rn_data, rn-rn_dlen);
+			rn-rn_data = NULL;
+		}
+
 		if (vp-v_type == VLNK)
 			PNBUF_PUT(rn-rn_linktarg);
 		if (rn-rn_hostpath)



CVS commit: src/usr.bin/make

2013-08-04 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sun Aug  4 16:48:15 UTC 2013

Modified Files:
src/usr.bin/make: job.c main.c

Log Message:
Move the call to Job_SetPrefix() to Job_Init() so that
makefiles have had a chance to set .MAKE.JOB.PREFIX


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/usr.bin/make/job.c
cvs rdiff -u -r1.222 -r1.223 src/usr.bin/make/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.175 src/usr.bin/make/job.c:1.176
--- src/usr.bin/make/job.c:1.175	Tue Jul 30 19:09:57 2013
+++ src/usr.bin/make/job.c	Sun Aug  4 16:48:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $	*/
+/*	$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $;
+static char rcsid[] = $NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
 #if 0
 static char sccsid[] = @(#)job.c	8.2 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $);
+__RCSID($NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -2198,6 +2198,7 @@ Job_SetPrefix(void)
 void
 Job_Init(void)
 {
+Job_SetPrefix();
 /* Allocate space for all the job info */
 job_table = bmake_malloc(maxJobs * sizeof *job_table);
 memset(job_table, 0, maxJobs * sizeof *job_table);

Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.222 src/usr.bin/make/main.c:1.223
--- src/usr.bin/make/main.c:1.222	Thu Jul 18 15:31:49 2013
+++ src/usr.bin/make/main.c	Sun Aug  4 16:48:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $	*/
+/*	$NetBSD: main.c,v 1.223 2013/08/04 16:48:15 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $;
+static char rcsid[] = $NetBSD: main.c,v 1.223 2013/08/04 16:48:15 sjg Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = @(#)main.c	8.3 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $);
+__RCSID($NetBSD: main.c,v 1.223 2013/08/04 16:48:15 sjg Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -995,7 +995,6 @@ main(int argc, char **argv)
 		snprintf(pn, sizeof(pn), %s[%d], progname, makelevel);
 		progname = bmake_strdup(pn);
 	}
-	Job_SetPrefix();
 
 #ifdef USE_META
 	meta_init();



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc

2013-08-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Aug  4 17:15:21 UTC 2013

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc: aes-ppc.S
ppccpuid.S sha512-ppc.S

Log Message:
Prefer . for the current address and not the PPC specific $.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aes-ppc.S \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512-ppc.S
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aes-ppc.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aes-ppc.S:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aes-ppc.S:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aes-ppc.S:1.3	Thu Jul 26 19:58:40 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/aes-ppc.S	Sun Aug  4 17:15:21 2013
@@ -4,7 +4,7 @@
 .align	7
 .LAES_Te:
 	mflr	0
-	bcl	20,31,$+4
+	bcl	20,31,.+4
 	mflr	3
 	addi	3,3,120
 	mtlr	0
@@ -14,7 +14,7 @@
 .space	28
 .LAES_Td:
 	mflr	0
-	bcl	20,31,$+4
+	bcl	20,31,.+4
 	mflr	3
 	addi	3,3,2360
 	mtlr	0
Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512-ppc.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512-ppc.S:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512-ppc.S:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512-ppc.S:1.3	Thu Jul 26 19:58:40 2012
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha512-ppc.S	Sun Aug  4 17:15:21 2013
@@ -1301,7 +1301,7 @@ sha256_block_data_order:
 .align	6
 .LPICmeup:
 	mflr	0
-	bcl	20,31,$+4
+	bcl	20,31,.+4
 	mflr	7
 	addi	7,7,56
 	mtlr	0

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.6 src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.7
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S:1.6	Fri Feb  8 03:05:43 2013
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/ppccpuid.S	Sun Aug  4 17:15:21 2013
@@ -93,7 +93,7 @@ OPENSSL_cleanse:
 .Little:	mtctr	4
 	stb	0,0(3)
 	addi	3,3,1
-	bc	16,0,$-8
+	bc	16,0,.-8
 	blr	
 .Lot:	andi.	5,3,3
 	beq	.Laligned
@@ -106,7 +106,7 @@ OPENSSL_cleanse:
 	mtctr	5
 	stw	0,0(3)
 	addi	3,3,4
-	bc	16,0,$-8
+	bc	16,0,.-8
 	andi.	4,4,3
 	bne	.Little
 	blr	



CVS commit: src/lib/csu/hppa

2013-08-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Aug  4 17:35:10 UTC 2013

Removed Files:
src/lib/csu/hppa: Makefile crt0.c dot_init.h

Log Message:
G/C old csu stuff for hppa.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/lib/csu/hppa/Makefile
cvs rdiff -u -r1.10 -r0 src/lib/csu/hppa/crt0.c
cvs rdiff -u -r1.8 -r0 src/lib/csu/hppa/dot_init.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/dist/gcc

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  4 22:18:16 UTC 2013

Modified Files:
src/external/gpl3/gcc/dist/gcc: config.gcc

Log Message:
match armv[467]*--netbsdelf*
and default cpu appropriately.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/external/gpl3/gcc/dist/gcc/config.gcc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config.gcc
diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.18 src/external/gpl3/gcc/dist/gcc/config.gcc:1.19
--- src/external/gpl3/gcc/dist/gcc/config.gcc:1.18	Fri Jul 19 16:23:10 2013
+++ src/external/gpl3/gcc/dist/gcc/config.gcc	Sun Aug  4 22:18:16 2013
@@ -728,7 +728,7 @@ arm*-*-freebsd*)
 arm*-*-netbsdelf*)
 	tm_file=dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h
 	case ${target} in
-	armeb*) tm_defines=${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1 ;;
+	arm*eb-*) tm_defines=${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1 ;;
 	esac
 	tmake_file=${tmake_file} arm/t-arm
 	case ${target} in
@@ -754,6 +754,11 @@ arm*-*-netbsdelf*)
 	tm_defines=${tm_defines} TARGET_DEFAULT_FLOAT_ABI=ARM_FLOAT_ABI_HARD
 	;;
 	esac
+	case ${target} in
+	armv4*) with_cpu=${with_cpu:-strongarm};;
+	armv6*) with_cpu=${with_cpu:-arm1176jzf-s};;
+	armv7*) with_cpu=${with_cpu:-cortex-a8};;
+	esac
 	;;
 arm*-*-netbsd*)
 	tm_file=arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h



CVS commit: src/external/gpl3/binutils/dist/ld

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  4 22:19:42 UTC 2013

Modified Files:
src/external/gpl3/binutils/dist/ld: configure.tgt

Log Message:
match armv[467]*--netbsdelf*


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils/dist/ld/configure.tgt

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/binutils/dist/ld/configure.tgt
diff -u src/external/gpl3/binutils/dist/ld/configure.tgt:1.9 src/external/gpl3/binutils/dist/ld/configure.tgt:1.10
--- src/external/gpl3/binutils/dist/ld/configure.tgt:1.9	Fri Jul 19 16:01:33 2013
+++ src/external/gpl3/binutils/dist/ld/configure.tgt	Sun Aug  4 22:19:42 2013
@@ -56,12 +56,13 @@ arm-*-coff)		targ_emul=armcoff ;;
 arm-*-freebsd* | arm-*-kfreebsd*-gnu)
 	   		targ_emul=armelf_fbsd
 			targ_extra_emuls=armelf ;;
-armeb-*-netbsdelf*-eabi*)
+arm*eb-*-netbsdelf*-eabi*)
 			targ_emul=armelfb_nbsd_eabi;
 			targ_extra_emuls=armelf_nbsd_eabi armelf armnbsd ;;
-arm-*-netbsdelf*-eabi*)	targ_emul=armelf_nbsd_eabi;
+arm*-*-netbsdelf*-eabi*)
+			targ_emul=armelf_nbsd_eabi;
 			targ_extra_emuls=armelfb_nbsd_eabi armelf armnbsd ;;
-armeb-*-netbsdelf*)	targ_emul=armelfb_nbsd;
+arm*eb-*-netbsdelf*)	targ_emul=armelfb_nbsd;
 			targ_extra_emuls=armelf_nbsd armelf armnbsd ;;
 arm-*-netbsdelf*)	targ_emul=armelf_nbsd;
 			targ_extra_emuls=armelfb_nbsd armelf armnbsd ;;



CVS commit: src/external/lgpl3/gmp/lib/libgmp

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  4 23:37:54 UTC 2013

Modified Files:
src/external/lgpl3/gmp/lib/libgmp: Makefile

Log Message:
If MACHINE_ARCH contains armv[467], use arm instead.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/lgpl3/gmp/lib/libgmp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/lgpl3/gmp/lib/libgmp/Makefile
diff -u src/external/lgpl3/gmp/lib/libgmp/Makefile:1.14 src/external/lgpl3/gmp/lib/libgmp/Makefile:1.15
--- src/external/lgpl3/gmp/lib/libgmp/Makefile:1.14	Mon Nov 26 18:57:33 2012
+++ src/external/lgpl3/gmp/lib/libgmp/Makefile	Sun Aug  4 23:37:54 2013
@@ -1,10 +1,12 @@
-#	$NetBSD: Makefile,v 1.14 2012/11/26 18:57:33 drochner Exp $
+#	$NetBSD: Makefile,v 1.15 2013/08/04 23:37:54 matt Exp $
 
 .include bsd.init.mk
 
 # We don't install gmp, just provide it for GCC.
 LIBISPRIVATE?=	yes
 
+LIBGMP_MACHINE_ARCH?=	${MACHINE_ARCH:C/armv[467]/arm/}
+
 .if ${LIBISPRIVATE} != yes
 INCS= gmp.h
 INCSDIR=  /usr/include
@@ -145,7 +147,7 @@ CLEANFILES+=	${_dir}_${_srcfile}
 
 .endfor
 
-CPPFLAGS+=	-I. -I${DIST} -I${.CURDIR}/arch/${MACHINE_ARCH} -D__GMP_WITHIN_GMP -DHAVE_CONFIG_H
+CPPFLAGS+=	-I. -I${DIST} -I${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH} -D__GMP_WITHIN_GMP -DHAVE_CONFIG_H
 
 WITHOUT_MAN=	yes
 
@@ -179,13 +181,14 @@ perfsqr.h: gen-psqr.c
 
 CLEANFILES+=	${DPSRCS} gen-fac_ui gen-fib gen-bases gen-psqr gen-trialdivtab
 
-.include ${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc
+
+.include ${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH}/Makefile.inc
 
 # XXX stuff looks for ../config.m4
 dummy:
 	mkdir dummy
-${.OBJDIR}/config.m4: ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4
-	cp ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4 ${.OBJDIR}/config.m4
+${.OBJDIR}/config.m4: ${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH}/config.m4
+	cp ${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH}/config.m4 ${.OBJDIR}/config.m4
 
 CLEANFILES+=	config.m4
 clean: cleandummy
@@ -218,7 +221,7 @@ CLEANFILES+=	mpn_${_build}   
 
 .PATH:	${DIST} \
 	${DIST}/mpn/generic \
-	${.CURDIR}/arch/${MACHINE_ARCH} \
+	${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH} \
 	${DIST}/mpf \
 	${DIST}/mpz
 



CVS commit: src/external/gpl3/gdb

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Aug  4 23:41:43 UTC 2013

Modified Files:
src/external/gpl3/gdb: Makefile.inc
src/external/gpl3/gdb/bin/gdb: Makefile
src/external/gpl3/gdb/bin/gdbtui: Makefile
src/external/gpl3/gdb/lib/libbfd: Makefile
src/external/gpl3/gdb/lib/libdecnumber: Makefile
src/external/gpl3/gdb/lib/libgdb: Makefile
src/external/gpl3/gdb/lib/libiberty: Makefile
src/external/gpl3/gdb/lib/libopcodes: Makefile
src/external/gpl3/gdb/lib/libreadline: Makefile
src/external/gpl3/gdb/lib/libsim: Makefile

Log Message:
Use GDB_MACHINE_ARCH instead of MACHINE_ARCH.
GDB_MACHINE_ARCH is MACHINE_ARCH, except armv[467] is replaced with arm instead.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/Makefile.inc
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/bin/gdb/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/bin/gdbtui/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/lib/libbfd/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libdecnumber/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/lib/libgdb/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libiberty/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libopcodes/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/lib/libreadline/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libsim/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gdb/Makefile.inc
diff -u src/external/gpl3/gdb/Makefile.inc:1.6 src/external/gpl3/gdb/Makefile.inc:1.7
--- src/external/gpl3/gdb/Makefile.inc:1.6	Fri Jun 22 20:32:35 2012
+++ src/external/gpl3/gdb/Makefile.inc	Sun Aug  4 23:41:43 2013
@@ -1,10 +1,12 @@
-# $NetBSD: Makefile.inc,v 1.6 2012/06/22 20:32:35 abs Exp $
+# $NetBSD: Makefile.inc,v 1.7 2013/08/04 23:41:43 matt Exp $
 
 USE_LIBEDIT=no
 USE_TUI=yes
 BINDIR=/usr/bin
 WARNS?=		0
 
+GDB_MACHINE_ARCH=	${MACHINE_ARCH:C/armv[457]/arm/}
+
 CWARNFLAGS.clang+=	-Wno-unused-value -Wno-conversion \
 			-Wno-switch-enum -Wno-parentheses -Wno-comment \
 			-Wno-format-security \

Index: src/external/gpl3/gdb/bin/gdb/Makefile
diff -u src/external/gpl3/gdb/bin/gdb/Makefile:1.5 src/external/gpl3/gdb/bin/gdb/Makefile:1.6
--- src/external/gpl3/gdb/bin/gdb/Makefile:1.5	Fri Nov  4 17:52:19 2011
+++ src/external/gpl3/gdb/bin/gdb/Makefile	Sun Aug  4 23:41:43 2013
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.5 2011/11/04 17:52:19 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2013/08/04 23:41:43 matt Exp $
 
 .include bsd.own.mk
 .include ../Makefile.inc
 
-GDBARCHDIR=${.CURDIR}/../../lib/libgdb/arch/${MACHINE_ARCH}
+GDBARCHDIR=${.CURDIR}/../../lib/libgdb/arch/${GDB_MACHINE_ARCH}
 .include ${GDBARCHDIR}/defs.mk
 
 PROG=		gdb
@@ -15,7 +15,7 @@ CPPFLAGS+=	-I${.CURDIR} \
 		-I${DIST}/gdb/config \
 		-I${DIST}/include/opcode \
 		-I${DIST} \
-		-I${.CURDIR}/../../lib/libbfd/arch/${MACHINE_ARCH} \
+		-I${.CURDIR}/../../lib/libbfd/arch/${GDB_MACHINE_ARCH} \
 		-I${DIST}/bfd \
 		-I${DIST}/include \
 		${GCPPFLAGS:M-D*}
@@ -55,8 +55,8 @@ LDADD+= -L${LIBGDBDIR} -lgdb
 DPADD+= ${LIBGDBDIR}/libgdb.a
 
 # Simulator support
-.if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == powerpcle || \
-${MACHINE_ARCH} == powerpc64
+.if ${GDB_MACHINE_ARCH} == powerpc || ${GDB_MACHINE_ARCH} == powerpcle || \
+${GDB_MACHINE_ARCH} == powerpc64
 SIMOBJ!=	cd ${.CURDIR}/../../lib/libsim  ${PRINTOBJDIR}
 LDADD+=		-L${SIMOBJ} -lsim
 DPADD+=		${SIMOBJ}/libsim.a
@@ -88,4 +88,4 @@ LDADD+=-lpthread_dbg
 .include bsd.prog.mk
 
 .PATH: ${DIST}/gdb ${DIST}/gdb/mi ${DIST}/gdb/cli ${DIST}/gdb/tui \
-${DIST}/gdb/signals ${DIST}/gdb/doc ${.CURDIR}/../arch/${MACHINE_ARCH}
+${DIST}/gdb/signals ${DIST}/gdb/doc ${.CURDIR}/../arch/${GDB_MACHINE_ARCH}

Index: src/external/gpl3/gdb/bin/gdbtui/Makefile
diff -u src/external/gpl3/gdb/bin/gdbtui/Makefile:1.3 src/external/gpl3/gdb/bin/gdbtui/Makefile:1.4
--- src/external/gpl3/gdb/bin/gdbtui/Makefile:1.3	Wed Oct 12 03:57:45 2011
+++ src/external/gpl3/gdb/bin/gdbtui/Makefile	Sun Aug  4 23:41:43 2013
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.3 2011/10/12 03:57:45 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2013/08/04 23:41:43 matt Exp $
 
 .include ../Makefile.inc
 
-GDBARCHDIR=${.CURDIR}/../../lib/libgdb/arch/${MACHINE_ARCH}
+GDBARCHDIR=${.CURDIR}/../../lib/libgdb/arch/${GDB_MACHINE_ARCH}
 .include ${GDBARCHDIR}/defs.mk
 
 PROG=		gdbtui
@@ -14,7 +14,7 @@ CPPFLAGS+=	-I${.CURDIR} \
 		-I${DIST}/gdb/config \
 		-I${DIST}/include/opcode \
 		-I${DIST} \
-		-I${.CURDIR}/../../lib/libbfd/arch/${MACHINE_ARCH} \
+		-I${.CURDIR}/../../lib/libbfd/arch/${GDB_MACHINE_ARCH} \
 		-I${DIST}/bfd \
 		-I${DIST}/include \
 		${GCPPFLAGS:M-D*}
@@ -42,8 +42,8 @@ LDADD+= -L${LIBGDBDIR} -lgdb
 DPADD+= ${LIBGDBDIR}/libgdb.a
 
 # Simulator support
-.if ${MACHINE_ARCH} == powerpc || 

CVS commit: src/external/gpl3/binutils

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug  5 00:08:58 UTC 2013

Modified Files:
src/external/gpl3/binutils/lib/libbfd: Makefile
src/external/gpl3/binutils/lib/libiberty: Makefile
src/external/gpl3/binutils/lib/libopcodes: Makefile
src/external/gpl3/binutils/usr.bin: Makefile Makefile.inc
src/external/gpl3/binutils/usr.bin/common: Makefile Makefile.inc
Makefile.prog
src/external/gpl3/binutils/usr.bin/gas: Makefile
src/external/gpl3/binutils/usr.bin/gprof: Makefile
src/external/gpl3/binutils/usr.bin/ld: Makefile

Log Message:
Use BINUTILS_MACHINE_ARCH instead of MACHINE_ARCH
BINUTILS_MACHINE_ARCH is MACHINE_ARCH,
except armv[467] is replaced with arm instead.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/binutils/lib/libbfd/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/binutils/lib/libiberty/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/binutils/lib/libopcodes/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/binutils/usr.bin/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/binutils/usr.bin/Makefile.inc
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/binutils/usr.bin/common/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/binutils/usr.bin/common/Makefile.inc
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl3/binutils/usr.bin/common/Makefile.prog
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/binutils/usr.bin/gas/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/binutils/usr.bin/gprof/Makefile
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/binutils/usr.bin/ld/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/binutils/lib/libbfd/Makefile
diff -u src/external/gpl3/binutils/lib/libbfd/Makefile:1.7 src/external/gpl3/binutils/lib/libbfd/Makefile:1.8
--- src/external/gpl3/binutils/lib/libbfd/Makefile:1.7	Fri Jun 22 20:32:35 2012
+++ src/external/gpl3/binutils/lib/libbfd/Makefile	Mon Aug  5 00:08:58 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2012/06/22 20:32:35 abs Exp $
+#	$NetBSD: Makefile,v 1.8 2013/08/05 00:08:58 matt Exp $
 
 NOLINKLIB=	# defined
 NOLINT=		# defined
@@ -18,10 +18,12 @@ libinstall:	# do nothing
 
 LIB=		bfd
 
-BFD_MACHINE_ARCH?=	${MACHINE_ARCH}
+BFD_MACHINE_ARCH?=	${MACHINE_ARCH:C/armv[467]/arm/}
 
-.if exists(${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk)
-.include ${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk
+DEFS_MK=${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk
+
+.if exists(${DEFS_MK})
+.include ${DEFS_MK}
 
 DIST=		${NETBSDSRCDIR}/external/gpl3/binutils/dist
 
@@ -35,7 +37,7 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${BFD_MACHI
 		-I${DIST}/bfd ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*} \
 		-DDEBUGDIR=\${DEBUGDIR}\
 
-.if (${MACHINE_ARCH} == vax)
+.if (${BFD_MACHINE_ARCH} == vax)
 CPPFLAGS.elf.c +=	-O0
 .endif
 

Index: src/external/gpl3/binutils/lib/libiberty/Makefile
diff -u src/external/gpl3/binutils/lib/libiberty/Makefile:1.2 src/external/gpl3/binutils/lib/libiberty/Makefile:1.3
--- src/external/gpl3/binutils/lib/libiberty/Makefile:1.2	Mon May 30 14:41:26 2011
+++ src/external/gpl3/binutils/lib/libiberty/Makefile	Mon Aug  5 00:08:58 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2011/05/30 14:41:26 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2013/08/05 00:08:58 matt Exp $
 
 NOLINT=		# defined
 NOPROFILE=	# defined
@@ -10,7 +10,9 @@ NOCLANGERROR=	# defined
 
 LIB=		iberty
 
-.include ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk
+BINUTILS_MACHINE_ARCH=${MACHINE_ARCH:C/armv[467]/arm/}
+
+.include ${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH}/defs.mk
 
 COPTS.argv.c = -Wno-stack-protector
 COPTS.cp-demangle.c = -Wno-stack-protector
@@ -22,7 +24,7 @@ DIST=		${NETBSDSRCDIR}/external/gpl3/bin
 SRCS=		${G_REQUIRED_OFILES:.o=.c} ${G_EXTRA_OFILES:.o=.c} \
 		${G_LIBOBJS:.o=.c} ${G_ALLOCA:.o=.c}
 
-CPPFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR}/arch/${MACHINE_ARCH} \
+CPPFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR}/arch/${BINUTILS_MACHINE_ARCH} \
 		-I${DIST}/include
 
 .PATH: ${DIST}/libiberty

Index: src/external/gpl3/binutils/lib/libopcodes/Makefile
diff -u src/external/gpl3/binutils/lib/libopcodes/Makefile:1.4 src/external/gpl3/binutils/lib/libopcodes/Makefile:1.5
--- src/external/gpl3/binutils/lib/libopcodes/Makefile:1.4	Sun Sep 25 04:32:46 2011
+++ src/external/gpl3/binutils/lib/libopcodes/Makefile	Mon Aug  5 00:08:58 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/09/25 04:32:46 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2013/08/05 00:08:58 matt Exp $
 
 NOLINKLIB=	# defined
 NOLINT=		# defined
@@ -10,7 +10,7 @@ NOCLANGERROR=	# defined
 
 LIB=		opcodes
 
-BFD_MACHINE_ARCH?=	${MACHINE_ARCH}
+BFD_MACHINE_ARCH?=	${MACHINE_ARCH:C/armv[467]/arm/}
 
 .if exists(${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk)
 .include ${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk

Index: src/external/gpl3/binutils/usr.bin/Makefile
diff -u src/external/gpl3/binutils/usr.bin/Makefile:1.3 

CVS commit: src/external/gpl3/binutils/usr.sbin

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug  5 00:17:53 UTC 2013

Modified Files:
src/external/gpl3/binutils/usr.sbin: Makefile.inc
src/external/gpl3/binutils/usr.sbin/dbsym: Makefile
src/external/gpl3/binutils/usr.sbin/mdsetimage: Makefile

Log Message:
Use BINUTILS_MACHINE_ARCH instead of MACHINE_ARCH
BINUTILS_MACHINE_ARCH is MACHINE_ARCH,
except armv[467] is replaced with arm instead.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/binutils/usr.sbin/Makefile.inc
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils/usr.sbin/dbsym/Makefile
cvs rdiff -u -r1.9 -r1.10 \
src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/binutils/usr.sbin/Makefile.inc
diff -u src/external/gpl3/binutils/usr.sbin/Makefile.inc:1.3 src/external/gpl3/binutils/usr.sbin/Makefile.inc:1.4
--- src/external/gpl3/binutils/usr.sbin/Makefile.inc:1.3	Sun Nov  1 00:12:00 2009
+++ src/external/gpl3/binutils/usr.sbin/Makefile.inc	Mon Aug  5 00:17:52 2013
@@ -1,9 +1,10 @@
-#	$NetBSD: Makefile.inc,v 1.3 2009/11/01 00:12:00 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.4 2013/08/05 00:17:52 matt Exp $
 
 BINDIR?=	/usr/sbin
 WARNS?=		1
 
 LDADD+=-lz
 .ifndef HOSTPROG
+BINUTILS_MACHINE_ARCH=${MACHINE_ARCH:C/armv[457]/arm/}
 DPADD+=${LIBZ}
 .endif

Index: src/external/gpl3/binutils/usr.sbin/dbsym/Makefile
diff -u src/external/gpl3/binutils/usr.sbin/dbsym/Makefile:1.9 src/external/gpl3/binutils/usr.sbin/dbsym/Makefile:1.10
--- src/external/gpl3/binutils/usr.sbin/dbsym/Makefile:1.9	Mon Feb 18 15:29:36 2013
+++ src/external/gpl3/binutils/usr.sbin/dbsym/Makefile	Mon Aug  5 00:17:53 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2013/02/18 15:29:36 gdt Exp $
+#	$NetBSD: Makefile,v 1.10 2013/08/05 00:17:53 matt Exp $
 
 .include bsd.own.mk
 
@@ -28,8 +28,8 @@ LDADD+=		-L${IBERTYDIR} -liberty
 .include bsd.prog.mk
 
 .ifndef HOSTPROG
-.include	${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH}/defs.mk
-CPPFLAGS+=	-I${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH} ${G_INCLUDES}
+.include	${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH}/defs.mk
+CPPFLAGS+=	-I${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH} ${G_INCLUDES}
 LDADD+=		-lintl
 DPADD+=		${LIBINTL}
 .endif # HOSTPROG

Index: src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile
diff -u src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.9 src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.10
--- src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.9	Mon Feb 18 15:32:02 2013
+++ src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile	Mon Aug  5 00:17:53 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2013/02/18 15:32:02 gdt Exp $
+#	$NetBSD: Makefile,v 1.10 2013/08/05 00:17:53 matt Exp $
 
 .include bsd.own.mk
 
@@ -28,9 +28,9 @@ CPPFLAGS+=	-I${BFDDIR}
 .include bsd.prog.mk
 
 .ifndef HOSTPROG
-.include	${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH}/defs.mk
+.include	${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH}/defs.mk
 
-CPPFLAGS+=	-I${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH} ${G_INCLUDES}
+CPPFLAGS+=	-I${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH} ${G_INCLUDES}
 LDADD+=		-lintl
 DPADD+=		${LIBINTL}
 DPADD+=		${LIBZ}



CVS commit: src/share/mk

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug  5 00:21:50 UTC 2013

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Add 3 more MACHINE_ARCH: earmv4 earmv7eb earmv7hfeb
The latter are for cortex big-endian which uses a different binary format
than previous arm big endian platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.740 -r1.741 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.740 src/share/mk/bsd.own.mk:1.741
--- src/share/mk/bsd.own.mk:1.740	Sat Jul 27 11:13:57 2013
+++ src/share/mk/bsd.own.mk	Mon Aug  5 00:21:50 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.740 2013/07/27 11:13:57 skrll Exp $
+#	$NetBSD: bsd.own.mk,v 1.741 2013/08/05 00:21:50 matt Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -14,7 +14,7 @@ MAKECONF?=	/etc/mk.conf
 #
 # CPU model, derived from MACHINE_ARCH
 #
-MACHINE_CPU=	${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:S/armeb/arm/:C/earm.*/arm/:S/earm/arm/:S/powerpc64/powerpc/}
+MACHINE_CPU=	${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:S/arm.*/arm/:C/earm.*/arm/:S/earm/arm/:S/powerpc64/powerpc/}
 
 #
 # Subdirectory used below ${RELEASEDIR} when building a release
@@ -690,9 +690,12 @@ SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_ve
 #
 GNU_ARCH.coldfire=m5407
 GNU_ARCH.earm=arm
-GNU_ARCH.earmeb=armeb
 GNU_ARCH.earmhf=arm
+GNU_ARCH.earmeb=armeb
 GNU_ARCH.earmhfeb=armeb
+GNU_ARCH.earmv4=armv4
+GNU_ARCH.earmv7eb=armv7eb
+GNU_ARCH.earmv7hfeb=armv7eb
 GNU_ARCH.i386=i486
 GCC_CONFIG_ARCH.i386=i486
 GCC_CONFIG_TUNE.i386=nocona
@@ -708,7 +711,7 @@ MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_AR
 # an elf tag for historically a.out platforms.
 #
 .if (!empty(MACHINE_ARCH:Mearm*))
-MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:S/earm/eabi/}
+MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:C/v7//:S/earm/eabi/}
 .elif (${MACHINE_GNU_ARCH} == arm || \
  ${MACHINE_GNU_ARCH} == armeb || \
  ${MACHINE_ARCH} == i386 || \



CVS commit: src

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug  5 00:28:52 UTC 2013

Modified Files:
src: build.sh

Log Message:
Add evbearmv7-eb and evbearmv7hf-eb aliases for evbarm.
These are because cortex (armv7a) cores uses a different big-endian binary
format that previous big-endian arm systems.


To generate a diff of this commit:
cvs rdiff -u -r1.270 -r1.271 src/build.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.270 src/build.sh:1.271
--- src/build.sh:1.270	Thu Jul 18 22:08:59 2013
+++ src/build.sh	Mon Aug  5 00:28:52 2013
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.270 2013/07/18 22:08:59 matt Exp $
+#	$NetBSD: build.sh,v 1.271 2013/08/05 00:28:52 matt Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -593,6 +593,10 @@ MACHINE=evbarm		MACHINE_ARCH=earm	ALIAS=
 MACHINE=evbarm		MACHINE_ARCH=earmeb	ALIAS=evbearm-eb
 MACHINE=evbarm		MACHINE_ARCH=earmhf	ALIAS=evbearmhf-el
 MACHINE=evbarm		MACHINE_ARCH=earmhfeb	ALIAS=evbearmhf-eb
+#MACHINE=evbarm		MACHINE_ARCH=earmv7	ALIAS=evbearmv7-el
+MACHINE=evbarm		MACHINE_ARCH=earmv7eb	ALIAS=evbearmv7-eb
+#MACHINE=evbarm		MACHINE_ARCH=earmv7hf	ALIAS=evbearmv7hf-el
+MACHINE=evbarm		MACHINE_ARCH=earmv7hfeb	ALIAS=evbearmv7hf-eb
 MACHINE=evbcf		MACHINE_ARCH=coldfire
 MACHINE=evbmips		MACHINE_ARCH=		NO_DEFAULT
 MACHINE=evbmips		MACHINE_ARCH=mips64eb	ALIAS=evbmips64-eb
@@ -1733,7 +1737,7 @@ createmakewrapper()
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.270 2013/07/18 22:08:59 matt Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.271 2013/08/05 00:28:52 matt Exp $
 # with these arguments: ${_args}
 #
 



CVS commit: src/sys/arch/arm

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug  5 00:57:24 UTC 2013

Modified Files:
src/sys/arch/arm/arm: cpu_exec.c
src/sys/arch/arm/include: elf_machdep.h

Log Message:
Add EF_ARM_BE8
Make sure that running a program, that it right big-endian format for the
processor. (BE8 for armv7, BE32 for all others).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/arm/cpu_exec.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/include/elf_machdep.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm/cpu_exec.c
diff -u src/sys/arch/arm/arm/cpu_exec.c:1.3 src/sys/arch/arm/arm/cpu_exec.c:1.4
--- src/sys/arch/arm/arm/cpu_exec.c:1.3	Sat Aug 11 07:18:53 2012
+++ src/sys/arch/arm/arm/cpu_exec.c	Mon Aug  5 00:57:24 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_exec.c,v 1.3 2012/08/11 07:18:53 matt Exp $	*/
+/*	$NetBSD: cpu_exec.c,v 1.4 2013/08/05 00:57:24 matt Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.3 2012/08/11 07:18:53 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.4 2013/08/05 00:57:24 matt Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_compat_netbsd32.h
@@ -68,6 +68,18 @@ arm_netbsd_elf32_probe(struct lwp *l, st
 #else
 	const bool aapcs_p = false;
 #endif
+#ifdef __ARMEB__
+	const bool be8_p = (eh-e_flags  EF_ARM_BE8) != 0;
+
+	/*
+	 * If the BE-8 model is supported, CPSR[7] will be clear.
+	 * If the BE-32 model is supported, CPSR[7] will be set.
+	 */
+	register_t cpsr;
+	__asm(mrs\t%0, cpsr : =r(cpsr));
+	if ((cpsr  CPU_CONTROL_BEND_ENABLE) == be8_p)
+		return ENOEXEC;
+#endif /* __ARMEB__ */
 
 	/*
 	 * This is subtle.  If are netbsd32, then we don't want to match the

Index: src/sys/arch/arm/include/elf_machdep.h
diff -u src/sys/arch/arm/include/elf_machdep.h:1.11 src/sys/arch/arm/include/elf_machdep.h:1.12
--- src/sys/arch/arm/include/elf_machdep.h:1.11	Wed Apr 24 22:35:23 2013
+++ src/sys/arch/arm/include/elf_machdep.h	Mon Aug  5 00:57:24 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf_machdep.h,v 1.11 2013/04/24 22:35:23 matt Exp $	*/
+/*	$NetBSD: elf_machdep.h,v 1.12 2013/08/05 00:57:24 matt Exp $	*/
 
 #ifndef _ARM_ELF_MACHDEP_H_
 #define _ARM_ELF_MACHDEP_H_
@@ -27,6 +27,7 @@
 #define EF_ARM_NEW_ABI		0x0080
 #define EF_ARM_OLD_ABI		0x0100
 #define EF_ARM_SOFT_FLOAT	0x0200
+#define EF_ARM_BE8		0x0080
 #define EF_ARM_EABIMASK		0xff00
 #define	EF_ARM_EABI_VER1	0x0100
 #define	EF_ARM_EABI_VER2	0x0200



CVS commit: src/sys/arch/arm/cortex

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug  5 00:59:19 UTC 2013

Modified Files:
src/sys/arch/arm/cortex: a9_mpsubr.S

Log Message:
Turn on CPU_CONTROL_EX_BEND for big endian in exceptions,
not CPU_CONTROL_BEND_ENABLE.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/cortex/a9_mpsubr.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/cortex/a9_mpsubr.S
diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.7 src/sys/arch/arm/cortex/a9_mpsubr.S:1.8
--- src/sys/arch/arm/cortex/a9_mpsubr.S:1.7	Sun Aug  4 01:20:08 2013
+++ src/sys/arch/arm/cortex/a9_mpsubr.S	Mon Aug  5 00:59:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9_mpsubr.S,v 1.7 2013/08/04 01:20:08 matt Exp $	*/
+/*	$NetBSD: a9_mpsubr.S,v 1.8 2013/08/05 00:59:19 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -114,14 +114,14 @@ arm_boot_l1pt_init:
 #define	CPU_CONTROL_SWP_ENABLE		0
 #endif
 #ifdef __ARMEL__
-#undef CPU_CONTROL_BEND_ENABLE		// needs to clear on LE systems
-#define	CPU_CONTROL_BEND_ENABLE		0
+#undef CPU_CONTROL_EX_BEND		// needs to clear on LE systems
+#define	CPU_CONTROL_EX_BEND		0
 #endif
 
 #define	CPU_CONTROL_SET \
 	(CPU_CONTROL_MMU_ENABLE		|	\
 	 CPU_CONTROL_AFLT_ENABLE	|	\
-	 CPU_CONTROL_BEND_ENABLE	|	\
+	 CPU_CONTROL_EX_BEND		|	\
 	 CPU_CONTROL_DC_ENABLE		|	\
 	 CPU_CONTROL_SWP_ENABLE		|	\
 	 CPU_CONTROL_BPRD_ENABLE	|	\



CVS commit: src/external/lgpl3/mpfr/lib/libmpfr

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug  5 01:46:57 UTC 2013

Modified Files:
src/external/lgpl3/mpfr/lib/libmpfr: Makefile

Log Message:
Use GMP_MACHINE_ARCH which is MACHINE_ARCH with arm substituted for armv[467].


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/lgpl3/mpfr/lib/libmpfr/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/lgpl3/mpfr/lib/libmpfr/Makefile
diff -u src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.10 src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.11
--- src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.10	Fri Aug 10 16:10:29 2012
+++ src/external/lgpl3/mpfr/lib/libmpfr/Makefile	Mon Aug  5 01:46:57 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2012/08/10 16:10:29 joerg Exp $
+#	$NetBSD: Makefile,v 1.11 2013/08/05 01:46:57 matt Exp $
 
 .include bsd.init.mk
 
@@ -476,7 +476,8 @@ CPPFLAGS+=	-I. \
 		-DHAVE_ATTRIBUTE_MODE=1
 
 # Find gmp.h
-CPPFLAGS+=	-I${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${MACHINE_ARCH}
+GMP_MACHINE_ARCH=${MACHINE_ARCH:C/armv[467]/arm/}
+CPPFLAGS+=	-I${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${GMP_MACHINE_ARCH}
 
 # XXX
 # XXX XXX check mips*



CVS commit: src/external/lgpl2/mpc/lib/libmpc

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug  5 01:53:42 UTC 2013

Modified Files:
src/external/lgpl2/mpc/lib/libmpc: Makefile

Log Message:
Use GMP_MACHINE_ARCH which is MACHINE_ARCH with arm substituted for armv[467].


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/lgpl2/mpc/lib/libmpc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/lgpl2/mpc/lib/libmpc/Makefile
diff -u src/external/lgpl2/mpc/lib/libmpc/Makefile:1.5 src/external/lgpl2/mpc/lib/libmpc/Makefile:1.6
--- src/external/lgpl2/mpc/lib/libmpc/Makefile:1.5	Wed Sep 21 02:06:42 2011
+++ src/external/lgpl2/mpc/lib/libmpc/Makefile	Mon Aug  5 01:53:42 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2011/09/21 02:06:42 mrg Exp $
+#	$NetBSD: Makefile,v 1.6 2013/08/05 01:53:42 matt Exp $
 
 .include bsd.init.mk
 
@@ -94,7 +94,8 @@ SRCS=	\
 CPPFLAGS+=	-I${.CURDIR}
 
 # Find mpfr.h and gmp.h
-CPPFLAGS+=	-I${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${MACHINE_ARCH}
+GMP_MACHINE_ARCH=${MACHINE_ARCH:C/armv[467]/arm/}
+CPPFLAGS+=	-I${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${GMP_MACHINE_ARCH}
 CPPFLAGS+=	-I${NETBSDSRCDIR}/external/lgpl3/mpfr/dist
 
 .include bsd.lib.mk



CVS commit: src/doc

2013-08-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug  5 03:06:51 UTC 2013

Modified Files:
src/doc: CHANGES

Log Message:
Add some device support for bge(4) and brgphy(4).


To generate a diff of this commit:
cvs rdiff -u -r1.1839 -r1.1840 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1839 src/doc/CHANGES:1.1840
--- src/doc/CHANGES:1.1839	Sat Aug  3 10:31:52 2013
+++ src/doc/CHANGES	Mon Aug  5 03:06:51 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1839 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1840 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -210,6 +210,8 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	zoneinfo: Import tzdata2013a. [apb 20130303]
 	zoneinfo: Import tzdata2013b. [apb 20130312]
 	libc: Update to tzcode2013b. [christos 20130315]
+	brgphy(4): Add support for BCM5756, BCM5717C, BCM5719C, BCM5720C and
+		BCM57780. [msaitoh 20130315]
 	vmt(4): Synchronize the clock periodically to ensure it remains
 		up-to-date even when the host is suspended.  [jmmv 20130316]
 	file(1): upgraded to 5.14 [christos 20130323]
@@ -253,6 +255,9 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 		acceleration using SX [macallan 20130619]
 	dhcpcd(8): Import dhcpcd-6.0.0 [roy 20130621]
 	zoneinfo: Import tzdata2013d. [apb 20130707]
+	bge(4): Add support for Altima AC1003, Apple BCM5701,
+		Broadcom BCM5787F, BCM5787G, BCM5787F, BCM5719, BCM5720,
+		BCM57766, BCM57782 and BCM57786. [msaitoh 20130708]
 	openresolv(8): Import openresolv-3.5.6 [roy 20130712]
 	libc: Update to tzcode2013d. [christo 20130717]
 	wpa:	Import wpa_supplicant and hostapd 1.1 [adam 20130717]



CVS commit: src/external/gpl3/gcc/usr.bin

2013-08-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug  5 03:22:45 UTC 2013

Modified Files:
src/external/gpl3/gcc/usr.bin: Makefile.inc

Log Message:
Use GMP_MACHINE_ARCH which is MACHINE_ARCH with arm substituted for armv[467].


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/usr.bin/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/usr.bin/Makefile.inc
diff -u src/external/gpl3/gcc/usr.bin/Makefile.inc:1.12 src/external/gpl3/gcc/usr.bin/Makefile.inc:1.13
--- src/external/gpl3/gcc/usr.bin/Makefile.inc:1.12	Sun Dec  2 12:55:27 2012
+++ src/external/gpl3/gcc/usr.bin/Makefile.inc	Mon Aug  5 03:22:45 2013
@@ -1,10 +1,12 @@
-#	$NetBSD: Makefile.inc,v 1.12 2012/12/02 12:55:27 apb Exp $
+#	$NetBSD: Makefile.inc,v 1.13 2013/08/05 03:22:45 matt Exp $
 
 .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_
 _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_=1
 
 .include bsd.own.mk
 
+GMP_MACHINE_ARCH=${MACHINE_ARCH:C/armv[467]/arm/}
+
 TOP=		${NETBSDSRCDIR}
 DIST=		${TOP}/external/gpl3/gcc/dist
 
@@ -14,7 +16,7 @@ CPPFLAGS+=	-DLOCALEDIR=\/usr/share/loca
 HOST_CPPFLAGS+=	-I${.CURDIR}/..
 
 # Link in the GMP/MPFR/MPC headers since we don't install them
-BUILDSYMLINKS+=	${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${MACHINE_ARCH}/gmp.h gmp.h
+BUILDSYMLINKS+=	${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${GMP_MACHINE_ARCH}/gmp.h gmp.h
 BUILDSYMLINKS+=	${NETBSDSRCDIR}/external/lgpl3/mpfr/dist/mpfr.h mpfr.h
 BUILDSYMLINKS+=	${NETBSDSRCDIR}/external/lgpl3/mpfr/dist/mpf2mpfr.h mpf2mpfr.h
 BUILDSYMLINKS+=	${NETBSDSRCDIR}/external/lgpl2/mpc/dist/src/mpc.h mpc.h