Author: andrew
Date: Tue Oct 30 14:44:12 2018
New Revision: 339916
URL: https://svnweb.freebsd.org/changeset/base/339916

Log:
  Build the csu tests on all architectures.
  
  The tests haven't been run them, but this is enough to build them so I can
  get feedback on if the various crt.h headers are correct.
  
  MFC with:     r339738
  Sponsored by: DARPA, AFRL

Added:
  head/lib/csu/arm/crt.h   (contents, props changed)
  head/lib/csu/mips/crt.h   (contents, props changed)
  head/lib/csu/powerpc/crt.h   (contents, props changed)
  head/lib/csu/riscv/crt.h   (contents, props changed)
  head/lib/csu/sparc64/crt.h   (contents, props changed)
Modified:
  head/lib/csu/Makefile
  head/lib/csu/tests/Makefile.tests

Modified: head/lib/csu/Makefile
==============================================================================
--- head/lib/csu/Makefile       Tue Oct 30 14:25:16 2018        (r339915)
+++ head/lib/csu/Makefile       Tue Oct 30 14:44:12 2018        (r339916)
@@ -8,10 +8,7 @@ SUBDIR+= ${MACHINE_ARCH}
 SUBDIR+= ${MACHINE_CPUARCH}
 .endif
 
-.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \
-    ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc64"
 HAS_TESTS=
 SUBDIR.${MK_TESTS}+= tests
-.endif
 
 .include <bsd.subdir.mk>

Added: head/lib/csu/arm/crt.h
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/csu/arm/crt.h      Tue Oct 30 14:44:12 2018        (r339916)
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+/* Empty so we can include this unconditionally */

Added: head/lib/csu/mips/crt.h
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/csu/mips/crt.h     Tue Oct 30 14:44:12 2018        (r339916)
@@ -0,0 +1,31 @@
+/*-
+ * SPDX-License-Identifier: BSD-1-Clause
+ *
+ * Copyright 2018 Andrew Turner
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _CRT_H_
+#define        _CRT_H_
+
+#define        HAVE_CTORS
+
+#endif

Added: head/lib/csu/powerpc/crt.h
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/csu/powerpc/crt.h  Tue Oct 30 14:44:12 2018        (r339916)
@@ -0,0 +1,33 @@
+/*-
+ * SPDX-License-Identifier: BSD-1-Clause
+ *
+ * Copyright 2018 Andrew Turner
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _CRT_H_
+#define        _CRT_H_
+
+#define        HAVE_CTORS
+#define        CTORS_CONSTRUCTORS
+#define        INIT_CALL_SEQ(func)     "bl " __STRING(func) "; nop"
+
+#endif

Added: head/lib/csu/riscv/crt.h
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/csu/riscv/crt.h    Tue Oct 30 14:44:12 2018        (r339916)
@@ -0,0 +1,2 @@
+/* $FreeBSD$ */
+/* Empty so we can include this unconditionally */

Added: head/lib/csu/sparc64/crt.h
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/csu/sparc64/crt.h  Tue Oct 30 14:44:12 2018        (r339916)
@@ -0,0 +1,31 @@
+/*-
+ * SPDX-License-Identifier: BSD-1-Clause
+ *
+ * Copyright 2018 Andrew Turner
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _CRT_H_
+#define        _CRT_H_
+
+#define        HAVE_CTORS
+
+#endif

Modified: head/lib/csu/tests/Makefile.tests
==============================================================================
--- head/lib/csu/tests/Makefile.tests   Tue Oct 30 14:25:16 2018        
(r339915)
+++ head/lib/csu/tests/Makefile.tests   Tue Oct 30 14:44:12 2018        
(r339916)
@@ -4,7 +4,7 @@ ATF_TESTS_C+=   init_test
 ATF_TESTS_C+=  fini_test
 ATF_TESTS_CXX+=        cxx_constructors
 
-WARNS?=                5
+WARNS?=                3
 
 .if exists(${.CURDIR:H:H}/${MACHINE_ARCH})
 CFLAGS+= -I${.CURDIR:H:H}/${MACHINE_ARCH}
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to