Re: hp700 part of next release?

Izumi Tsutsui <[email protected]>
Newsgroups gmane.os.netbsd.ports.hp700
Message-ID <[email protected]>
In article <v03130302bae234c1fa89@[10.0.1.2]>
[email protected] wrote:

> :)There are a log of work for hp700 to catch up current MI changes,
> :)but I don't know if anyone is working to fix them.
> 
> Sounds grim.  Disappointing, but thanks for the status update.  I'll hold
> off for now.

Just FYI:

(1) There is working cross toolchain for i386:
ftp://ftp.netbsd.org/pub/NetBSD/misc/fredette/hp700/cross-hppa-netbsd-1.1.0.1.tgz
    (you can use it by pkg_add(1) on i386)

    arch/stand/mkboot can compile on i386 as a host tool (fixed by chuq),
    so I think you can still try pre-SA (prior 1.6P) kernel.

(2) I tried to fix gcc-3.3_branch but it stuck. (non-working patch attached)
    Maybe we should not use dbxelf.h and elfos.h, but not sure.

(3) Diskless NetBSD How-to for hp700 is quite enough:
http://www.netbsd.org/Documentation/network/netboot/intro.hp700.html

    For some newer machines (like 712/60) requires dhcpd patch:
http://mail-index.netbsd.org/port-hp700/2002/03/04/0000.html
    but I don't know it is fixed the recent dhcp in -current.

(4) When I checked osiop(4) and oosiop(4) on hp700 (with 1.6P sources),
    it seems there are some pmap/vm bugs. I've filed one of them
    (port-hppa/20933) and physio works fine with the patch, but
    executing binaries on disks still has some problem.

etc. etc.
---
Izumi Tsutsui
[email protected]

Index: gcc/config.gcc
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.266.2.6
diff -u -r1.266.2.6 config.gcc
--- gcc/config.gcc	2 Mar 2003 01:31:01 -0000	1.266.2.6
+++ gcc/config.gcc	10 May 2003 08:55:29 -0000
@@ -769,6 +769,11 @@
 		 pa/pa32-regs.h pa/pa32-linux.h"
 	tmake_file="t-slibgcc-elf-ver t-linux pa/t-linux"
 	;;
+hppa*-*-netbsd*)
+	tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h pa/netbsd.h"
+	tmake_file=t-netbsd
+	fixincludes=fixinc.wrap
+	;;
 hppa*-*-openbsd*)
 	target_cpu_default="MASK_PA_11"
 	tmake_file=pa/t-bsd
--- /dev/null	2003-05-10 12:50:25.000000000 +0900
+++ gcc/config/pa/netbsd.h	2003-03-30 01:37:29.000000000 +0900
@@ -0,0 +1,152 @@
+/*  Definitions for PA_RISC with ELF format on NetBSD
+ *  Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+ *  Copyright (C) 2000 Eric Schnoebelen, the Central Iowa (Model) Railroad
+ *
+ *  This file is part of GNU CC.
+ *
+ *  GNU CC is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2, or (at your option)
+ *  any later version.
+ *
+ *  GNU CC is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with GNU CC; see the file COPYING.  If not, write to
+ *  the Free Software Foundation, 59 Temple Place - Suite 330,
+ *  Boston, MA 02111-1307, USA.  
+ */
+
+/* This is used on hppa platforms that use the ELF format.
+ * This was taken from the Linux (and NetBSD/Alpha) configuration, 
+ * and modified for NetBSD/hppa by Eric Schnoebelen <[email protected]> 
+ */
+
+#include <pa/pa32-regs.h>
+
+/* So we can conditionalize small amounts of code in pa.c or pa.md.  */
+#define OBJ_ELF
+
+#define TEXT_SECTION_ASM_OP "\t.text"
+#define DATA_SECTION_ASM_OP "\t.data"
+#define BSS_SECTION_ASM_OP "\t.section\t.bss"
+
+#undef ASM_FILE_START
+#define ASM_FILE_START(FILE) \
+do {  \
+     if (TARGET_PA_20) \
+       fputs("\t.LEVEL 2.0\n", FILE); \
+     else if (TARGET_PA_11) \
+       fputs("\t.LEVEL 1.1\n", FILE); \
+     else \
+       fputs("\t.LEVEL 1.0\n", FILE); \
+     if (profile_flag)\
+       fprintf (FILE, "\t.IMPORT _mcount, ENTRY\n");\
+     if (write_symbols != NO_DEBUG) \
+       output_file_directive ((FILE), main_input_filename); \
+   } while (0)
+
+#undef ASM_DECLARE_FUNCTION_NAME
+#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
+do {  \
+  if (TREE_PUBLIC (DECL)) \
+    { \
+      fputs ("\t.EXPORT ", FILE); \
+      assemble_name (FILE, NAME); \
+      fputs (",ENTRY\n", FILE); \
+    } \
+   } while (0)
+
+#undef SIZE_TYPE
+#define SIZE_TYPE "unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "int"
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() NETBSD_OS_CPP_BUILTINS_ELF();
+
+#undef CPP_SPEC
+#define CPP_SPEC "%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{mhppa:-D__hppa__} %{posix:-D_POSIX_SOURCE} -D__hp9000s700 -D_PA_RISC1_1"
+
+/* should be auto defined in defaults.h */
+#define SUPPORTS_WEAK  1
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT	(MASK_GAS|MASK_JUMP_IN_DELAY|MASK_PA_11)
+
+#undef TARGET_ELF32
+#define TARGET_ELF32 1
+
+/* This says how to output an assembler line to define a global common symbol
+   with size SIZE (in bytes) and alignment ALIGN (in bits).  */
+
+#undef ASM_OUTPUT_ALIGNED_COMMON
+#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGNED)		\
+do { bss_section ();							\
+  assemble_name ((FILE), (NAME));					\
+  fputs ("\t.comm\t", (FILE));						\
+  fprintf ((FILE), "%d\n", MAX ((SIZE), ((ALIGNED) / BITS_PER_UNIT)));	\
+} while (0)
+
+/* This says how to output an assembler line to define a local common symbol
+   with size SIZE (in bytes) and alignment ALIGN (in bits).  */
+
+#undef ASM_OUTPUT_ALIGNED_LOCAL
+#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGNED)		\
+do { bss_section ();							\
+  fprintf ((FILE), "\t.align\t%d\n", ((ALIGNED) / BITS_PER_UNIT));	\
+  assemble_name ((FILE), (NAME));					\
+  fprintf ((FILE), "\n\t.block\t%d\n", (SIZE));				\
+} while (0)
+
+/* Define these to generate the Linux/ELF/SysV style of internal
+   labels all the time - i.e. to be compatible with
+   ASM_GENERATE_INTERNAL_LABEL in <elfos.h>.  Compare these with the
+   ones in pa.h and note the lack of dollar signs in these.  FIXME:
+   shouldn't we fix pa.h to use ASM_GENERATE_INTERNAL_LABEL instead? */
+
+#undef ASM_OUTPUT_ADDR_VEC_ELT
+#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
+  if (TARGET_BIG_SWITCH)					\
+    fprintf (FILE, "\tstw %%r1,-16(%%r30)\n\tldil LR'.L%d,%%r1\n\tbe RR'.L%d(%%sr4,%%r1)\n\tldw -16(%%r30),%%r1\n", VALUE, VALUE);		\
+  else								\
+    fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE)
+
+#undef ASM_OUTPUT_ADDR_DIFF_ELT
+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
+  if (TARGET_BIG_SWITCH)					\
+    fprintf (FILE, "\tstw %%r1,-16(%%r30)\n\tldw T'.L%d(%%r19),%%r1\n\tbv %%r0(%%r1)\n\tldw -16(%%r30),%%r1\n", VALUE);				\
+  else								\
+    fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE)
+
+#if 0
+/* Use the default.  */
+#undef ASM_OUTPUT_LABEL
+#endif
+
+/* NOTE: ASM_OUTPUT_INTERNAL_LABEL() is defined for us by elfos.h, and
+   does what we want (i.e. uses colons).  It must be compatible with
+   ASM_GENERATE_INTERNAL_LABEL(), so do not define it here.  */
+
+/* Use the default.  */
+#undef TARGET_ASM_GLOBALIZE_LABEL
+/* Globalizing directive for a label.  */
+#define GLOBAL_ASM_OP "\t.globl\t"
+
+/* Output a definition */
+#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)				\
+do {									\
+    fprintf ((FILE), "\t%s\t", SET_ASM_OP);				\
+    assemble_name (FILE, LABEL1);					\
+    fprintf (FILE, ",");						\
+    assemble_name (FILE, LABEL2);					\
+    fprintf (FILE, "\n");						\
+} while (0)
+
+/*  NetBSD always uses gas.  */
+#undef TARGET_GAS
+#define TARGET_GAS 1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.