summaryrefslogtreecommitdiff
path: root/usr.bin/pcc/os
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-09-15 18:12:38 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-09-15 18:12:38 +0000
commit288752b760425fddc6fe00d317697ef966764b4c (patch)
tree6bee0a7eedda0f3e0b663d60edb6ee68e7cbe197 /usr.bin/pcc/os
parentedb2678b922125cc3a94923d29e556e735c9b7e7 (diff)
Import ragge's version of PCC into our tree, so we can hack on it more
easy. ok deraadt@ miod@
Diffstat (limited to 'usr.bin/pcc/os')
-rw-r--r--usr.bin/pcc/os/dragonfly/ccconfig.h47
-rw-r--r--usr.bin/pcc/os/linux/ccconfig.h49
-rw-r--r--usr.bin/pcc/os/netbsd/ccconfig.h47
-rw-r--r--usr.bin/pcc/os/netbsd/f77config.h54
-rw-r--r--usr.bin/pcc/os/none/ccconfig.h50
-rw-r--r--usr.bin/pcc/os/openbsd/ccconfig.h47
-rw-r--r--usr.bin/pcc/os/openbsd/f77config.h46
7 files changed, 340 insertions, 0 deletions
diff --git a/usr.bin/pcc/os/dragonfly/ccconfig.h b/usr.bin/pcc/os/dragonfly/ccconfig.h
new file mode 100644
index 00000000000..08afb5fe161
--- /dev/null
+++ b/usr.bin/pcc/os/dragonfly/ccconfig.h
@@ -0,0 +1,47 @@
+/* $Id: ccconfig.h,v 1.1 2007/09/15 18:12:37 otto Exp $ */
+
+/*
+ * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se).
+ * All rights reserved.
+ *
+ * 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.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * 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.
+ */
+
+/*
+ * Various settings that controls how the C compiler works.
+ */
+
+/* common cpp predefines */
+#define CPPADD { "-D__DragonFly__", "-D__ELF__", NULL, }
+#define DYNLINKER { "-dynamic-linker", "/usr/libexec/ld.elf_so.2", NULL }
+#define CRT0FILE "/usr/lib/crt1.o"
+#define STARTFILES { "/usr/lib/crti.o", "/usr/lib/crtbegin.o", NULL }
+#define ENDFILES { "/usr/lib/crtend.o", "/usr/lib/crtn.o", NULL }
+
+#if defined(mach_x86)
+#define CPPMDADD { "-D__i386__", NULL, }
+#else
+#error defines for arch missing
+#endif
+
+#define STABS
diff --git a/usr.bin/pcc/os/linux/ccconfig.h b/usr.bin/pcc/os/linux/ccconfig.h
new file mode 100644
index 00000000000..41cb8b83455
--- /dev/null
+++ b/usr.bin/pcc/os/linux/ccconfig.h
@@ -0,0 +1,49 @@
+/* $Id: ccconfig.h,v 1.1 2007/09/15 18:12:37 otto Exp $ */
+
+/*
+ * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se).
+ * All rights reserved.
+ *
+ * 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.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * 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.
+ */
+
+/*
+ * Various settings that controls how the C compiler works.
+ */
+
+/* common cpp predefines */
+#define CPPADD { "-D__linux__", "-D__ELF__", "-I" INCLUDEDIR "/pcc", NULL, }
+#define DYNLINKER { "-dynamic-linker", "/lib/ld-linux.so.2", NULL }
+#define CRT0FILE "/usr/lib/crt1.o"
+#define STARTFILES { "/usr/lib/crti.o", "/usr/lib/gcc/i586-suse-linux/4.1.0/crtbegin.o", NULL }
+#define LIBCLIBS { "-lc", "-lgcc_s", NULL }
+#define ENDFILES { "/usr/lib/gcc/i586-suse-linux/4.1.0/crtend.o", "/usr/lib/crtn.o", NULL }
+#define STARTLABEL "_start"
+
+#if defined(mach_x86)
+#define CPPMDADD { "-D__i386__", NULL, }
+#else
+#error defines for arch missing
+#endif
+
+#define STABS
diff --git a/usr.bin/pcc/os/netbsd/ccconfig.h b/usr.bin/pcc/os/netbsd/ccconfig.h
new file mode 100644
index 00000000000..f0eecd3b704
--- /dev/null
+++ b/usr.bin/pcc/os/netbsd/ccconfig.h
@@ -0,0 +1,47 @@
+/* $Id: ccconfig.h,v 1.1 2007/09/15 18:12:37 otto Exp $ */
+
+/*
+ * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se).
+ * All rights reserved.
+ *
+ * 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.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * 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.
+ */
+
+/*
+ * Various settings that controls how the C compiler works.
+ */
+
+/* common cpp predefines */
+#define CPPADD { "-D__NetBSD__", "-D__ELF__", NULL, }
+#define DYNLINKER { "-dynamic-linker", "/usr/libexec/ld.elf_so", NULL }
+#define CRT0FILE "/usr/lib/crt0.o"
+#define STARTFILES { "/usr/lib/crti.o", "/usr/lib/crtbegin.o", NULL }
+#define ENDFILES { "/usr/lib/crtend.o", "/usr/lib/crtn.o", NULL }
+
+#if defined(mach_x86)
+#define CPPMDADD { "-D__i386__", NULL, }
+#else
+#error defines for arch missing
+#endif
+
+#define STABS
diff --git a/usr.bin/pcc/os/netbsd/f77config.h b/usr.bin/pcc/os/netbsd/f77config.h
new file mode 100644
index 00000000000..6bbc447b855
--- /dev/null
+++ b/usr.bin/pcc/os/netbsd/f77config.h
@@ -0,0 +1,54 @@
+/* $Id: f77config.h,v 1.1 2007/09/15 18:12:37 otto Exp $ */
+
+/*
+ * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se).
+ * All rights reserved.
+ *
+ * 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.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * 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.
+ */
+
+/*
+ * Various settings that controls how the f77 compiler works.
+ */
+
+#if 0
+/* common cpp predefines */
+#define CPPADD { "-D__NetBSD__", "-D__ELF__", NULL, }
+#define DYNLINKER { "-dynamic-linker", "/usr/libexec/ld.elf_so", NULL }
+#define CRT0FILE "/usr/lib/crt0.o"
+#define STARTFILES { "/usr/lib/crti.o", "/usr/lib/crtbegin.o", NULL }
+#define ENDFILES { "/usr/lib/crtend.o", "/usr/lib/crtn.o", NULL }
+#endif
+#define PASS1NAME "/usr/lib/f77pass1"
+#define PASS2NAME "/lib/f1"
+#define PASS2OPT "/lib/c2"
+#define NOFLPASS2 "/lib/fc1"
+
+#define ASMNAME "/usr/bin/as"
+#define LDNAME "/usr/bin/ld"
+#define FOOTNAME "/usr/lib/crt0.o"
+#define PROFFOOT "/usr/lib/mcrt0.o"
+#define NOFLFOOT "/usr/lib/fcrt0.o"
+#define NOFLPROFFOOT "/usr/lib/fmcrt0.o"
+#define LIBLIST { "-lF77", "-lI77", "-lm", "-lc", "-l", NULL };
+
diff --git a/usr.bin/pcc/os/none/ccconfig.h b/usr.bin/pcc/os/none/ccconfig.h
new file mode 100644
index 00000000000..5bb3af33f42
--- /dev/null
+++ b/usr.bin/pcc/os/none/ccconfig.h
@@ -0,0 +1,50 @@
+/* $Id: ccconfig.h,v 1.1 2007/09/15 18:12:37 otto Exp $ */
+
+/*
+ * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se).
+ * All rights reserved.
+ *
+ * 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.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * 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.
+ */
+
+/*
+ * Various settings that controls how the C compiler works.
+ */
+
+/*
+ * This file is for targets where there is no OS
+ */
+
+/* common cpp predefines */
+#define CPPADD { NULL, }
+#define DYNLINKER { NULL }
+#define CRT0FILE ""
+#define STARTFILES { NULL }
+#define ENDFILES { NULL }
+
+#if defined(mach_m16c)
+#define CPPMDADD { "-D__m16c__", NULL, }
+#elif defined(mach_nova)
+#define CPPMDADD { "-D__nova__", NULL, }
+#endif
+
diff --git a/usr.bin/pcc/os/openbsd/ccconfig.h b/usr.bin/pcc/os/openbsd/ccconfig.h
new file mode 100644
index 00000000000..b0962add596
--- /dev/null
+++ b/usr.bin/pcc/os/openbsd/ccconfig.h
@@ -0,0 +1,47 @@
+/* $Id: ccconfig.h,v 1.1 2007/09/15 18:12:37 otto Exp $ */
+
+/*
+ * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se).
+ * All rights reserved.
+ *
+ * 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.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * 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.
+ */
+
+/*
+ * Various settings that controls how the C compiler works.
+ */
+
+/* common cpp predefines */
+#define CPPADD { "-D__OpenBSD__", "-D__ELF__", NULL, }
+#define DYNLINKER { "-dynamic-linker", "/usr/libexec/ld.so", NULL }
+#define CRT0FILE "/usr/lib/crt0.o"
+#define STARTFILES { "/usr/lib/crtbegin.o", NULL }
+#define ENDFILES { "/usr/lib/crtend.o", NULL }
+
+#if defined(mach_x86)
+#define CPPMDADD { "-D__i386__", NULL, }
+#else
+#error defines for arch missing
+#endif
+
+#define STABS
diff --git a/usr.bin/pcc/os/openbsd/f77config.h b/usr.bin/pcc/os/openbsd/f77config.h
new file mode 100644
index 00000000000..8ac985d8eab
--- /dev/null
+++ b/usr.bin/pcc/os/openbsd/f77config.h
@@ -0,0 +1,46 @@
+/* $Id: f77config.h,v 1.1 2007/09/15 18:12:37 otto Exp $ */
+
+/*
+ * Copyright (c) 2004 Anders Magnusson (ragge@ludd.luth.se).
+ * All rights reserved.
+ *
+ * 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.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * 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.
+ */
+
+/*
+ * Various settings that controls how the f77 compiler works.
+ */
+
+#define PASS1NAME "/usr/lib/f77pass1"
+#define PASS2NAME "/lib/f1"
+#define PASS2OPT "/lib/c2"
+#define NOFLPASS2 "/lib/fc1"
+
+#define ASMNAME "/usr/bin/as"
+#define LDNAME "/usr/bin/ld"
+#define FOOTNAME "/usr/lib/crt0.o"
+#define PROFFOOT "/usr/lib/mcrt0.o"
+#define NOFLFOOT "/usr/lib/fcrt0.o"
+#define NOFLPROFFOOT "/usr/lib/fmcrt0.o"
+#define LIBLIST { "-lF77", "-lI77", "-lm", "-lc", "-l", NULL };
+