linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* kerne-2.4.0-test13pre3 with gcc-2.97
@ 2000-12-23  5:52 Kaoru Fukui
       [not found] ` <20001223142145.T5858@coruscant.gnumonks.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Kaoru Fukui @ 2000-12-23  5:52 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: gcc


Hi !

I tried to compile kernel-2.4.0-test13-pre3 with gcc-2.97.
It need the patch.
The gcc-2.97 makes singleCPU work kernel  well,
But the smp kernel didn't work.

The gcc-2.95.3 makes both work kernel , very well without this patch.

Does this kernel problems or gcc problems?

My system is linuxppc.

Kaoru

------ gcc --------
[root@g4mpKFUKUI kernel-single]# gcc -v
Reading specs from /usr/lib/gcc-lib/ppc-redhat-linux/2.97/specs
Configured with: /usr/src/redhat/BUILD/gcc-2.97/configure --prefix=/usr --enable-shared -
-enable-threads --host=ppc-redhat-linux --with-cpp-install-dir=../lib --enable-libstdcxx-v3
ppc-redhat-linux
gcc version 2.97 20001217 (experimental)
[root@g4mpKFUKUI kernel-single]#

----- patch for kernel-2.4.0-test13pre3 ---------
diff -urN base/linux/drivers/usb/audio.c fixed/linux/drivers/usb/audio.c
--- base/linux/drivers/usb/audio.c	Fri Dec 22 13:47:44 2000
+++ fixed/linux/drivers/usb/audio.c	Sat Dec 23 12:18:21 2000
@@ -788,7 +788,7 @@
 {
 	union {
 		__s16 s[64];
-		unsigned char b[0];
+		unsigned char *b;
 	} tmp;
 	unsigned int scnt, maxs, ufmtsh, dfmtsh;

@@ -1139,7 +1139,7 @@
 {
 	union {
 		__s16 s[64];
-		unsigned char b[0];
+		unsigned char *b;
 	} tmp;
 	unsigned int scnt, maxs, ufmtsh, dfmtsh;

diff -urN base/linux/drivers/video/aty128fb.c fixed/linux/drivers/video/aty128fb.c
--- base/linux/drivers/video/aty128fb.c	Fri Dec 22 13:47:45 2000
+++ fixed/linux/drivers/video/aty128fb.c	Sat Dec 23 10:09:02 2000
@@ -148,7 +148,7 @@
 };

 /* supported Rage128 chipsets */
-static const struct aty128_chip_info aty128_pci_probe_list[] __initdata =
+static const struct aty128_chip_info *aty128_pci_probe_list __initdata =
 {
     {"Rage128 RE (PCI)", PCI_DEVICE_ID_ATI_RAGE128_RE, rage_128},
     {"Rage128 RF (AGP)", PCI_DEVICE_ID_ATI_RAGE128_RF, rage_128},
diff -urN base/linux/net/ipv4/netfilter/ip_nat_rule.c fixed/linux/net/ipv4/
netfilter/ip_nat_rule.c
--- base/linux/net/ipv4/netfilter/ip_nat_rule.c	Fri Dec 22 13:48:22 2000
+++ fixed/linux/net/ipv4/netfilter/ip_nat_rule.c	Sat Dec 23 10:47:59 2000
@@ -62,31 +62,31 @@
       { [NF_IP_PRE_ROUTING] 0,
 	[NF_IP_POST_ROUTING] sizeof(struct ipt_standard),
 	[NF_IP_LOCAL_OUT] sizeof(struct ipt_standard) * 2 },
-      0, NULL, { } },
+      0, NULL },
     {
 	    /* PRE_ROUTING */
 	    { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
 		0,
 		sizeof(struct ipt_entry),
 		sizeof(struct ipt_standard),
-		0, { 0, 0 }, { } },
-	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
+		0, { 0, 0 } },
+	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } } },
 		-NF_ACCEPT - 1 } },
 	    /* POST_ROUTING */
 	    { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
 		0,
 		sizeof(struct ipt_entry),
 		sizeof(struct ipt_standard),
-		0, { 0, 0 }, { } },
-	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
+		0, { 0, 0 } },
+	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } } },
 		-NF_ACCEPT - 1 } },
 	    /* LOCAL_OUT */
 	    { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
 		0,
 		sizeof(struct ipt_entry),
 		sizeof(struct ipt_standard),
-		0, { 0, 0 }, { } },
-	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
+		0, { 0, 0 } },
+	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } } },
 		-NF_ACCEPT - 1 } }
     },
     /* ERROR */
@@ -94,9 +94,8 @@
 	0,
 	sizeof(struct ipt_entry),
 	sizeof(struct ipt_error),
-	0, { 0, 0 }, { } },
-      { { { { IPT_ALIGN(sizeof(struct ipt_error_target)), IPT_ERROR_TARGET }
 },

-	  { } },
+	0, { 0, 0 } },
+      { { { { IPT_ALIGN(sizeof(struct ipt_error_target)), IPT_ERROR_TARGET }
 } },
 	"ERROR"
       }
     }
diff -urN base/linux/net/ipv4/netfilter/ip_tables.c fixed/linux/net/ipv4/netfilter/
ip_tables.c
--- base/linux/net/ipv4/netfilter/ip_tables.c	Fri Dec 22 13:48:22 2000
+++ fixed/linux/net/ipv4/netfilter/ip_tables.c	Sat Dec 23 10:33:10 2000
@@ -1358,7 +1358,7 @@
 	int ret;
 	struct ipt_table_info *newinfo;
 	static struct ipt_table_info bootstrap
-		= { 0, 0, { 0 }, { 0 }, { } };
+		= { 0, 0, { 0 }, { 0 }, {0} };

 	MOD_INC_USE_COUNT;
 	newinfo = vmalloc(sizeof(struct ipt_table_info)
diff -urN base/linux/net/ipv4/netfilter/iptable_filter.c fixed/linux/net/ipv4/
netfilter/iptable_filter.c
--- base/linux/net/ipv4/netfilter/iptable_filter.c	Fri Dec 22 13:48:22 2000
+++ fixed/linux/net/ipv4/netfilter/iptable_filter.c	Sat Dec 23 10:44:56 2000
@@ -41,31 +41,31 @@
       { [NF_IP_LOCAL_IN] 0,
 	[NF_IP_FORWARD] sizeof(struct ipt_standard),
 	[NF_IP_LOCAL_OUT] sizeof(struct ipt_standard) * 2 },
-      0, NULL, { } },
+      0, NULL },
     {
 	    /* LOCAL_IN */
 	    { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
 		0,
 		sizeof(struct ipt_entry),
 		sizeof(struct ipt_standard),
-		0, { 0, 0 }, { } },
-	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
+		0, { 0, 0 } },
+	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } } },
 		-NF_ACCEPT - 1 } },
 	    /* FORWARD */
 	    { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
 		0,
 		sizeof(struct ipt_entry),
 		sizeof(struct ipt_standard),
-		0, { 0, 0 }, { } },
-	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
+		0, { 0, 0 } },
+	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } } },
 		-NF_ACCEPT - 1 } },
 	    /* LOCAL_OUT */
 	    { { { { 0 }, { 0 }, { 0 }, { 0 }, "", "", { 0 }, { 0 }, 0, 0, 0 },
 		0,
 		sizeof(struct ipt_entry),
 		sizeof(struct ipt_standard),
-		0, { 0, 0 }, { } },
-	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } }, { } },
+		0, { 0, 0 } },
+	      { { { { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" } } },
 		-NF_ACCEPT - 1 } }
     },
     /* ERROR */
@@ -73,9 +73,8 @@
 	0,
 	sizeof(struct ipt_entry),
 	sizeof(struct ipt_error),
-	0, { 0, 0 }, { } },
-      { { { { IPT_ALIGN(sizeof(struct ipt_error_target)), IPT_ERROR_TARGET }
 },
-	  { } },
+	0, { 0, 0 } },
+      { { { { IPT_ALIGN(sizeof(struct ipt_error_target)), IPT_ERROR_TARGET }
 } },
 	"ERROR"
       }
     }


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: how to use macro in assemble language embedded in C?
@ 2000-12-27 11:04 Kaoru Fukui
  0 siblings, 0 replies; 13+ messages in thread
From: Kaoru Fukui @ 2000-12-27 11:04 UTC (permalink / raw)
  To: linuxppc-dev


> Hi,
>
> (NOTE: when reply this mail, please cc: kerler@newmail.net , thanks)
>
> I change the first line of temp.c:
>     asm("#include <asm\\ptrace.h>\n\t");
> to
>     asm("#include <asm/ptrace.h>\n\t");
> ==========temp.c==================
>  asm("#include <asm/ptrace.h>\n\t");
>  void dummy (void)
>  {
>      asm("stwu   %r1, -PT_R16(%r1)");             /* stack */
>  }

The problem is in YOUR syntax.
Inline asm is C launguage ,so C rabel can not put in string field like "-PT
_R16".
The compiler doesn't search the rabel which is put in string field

You can find some examples in asm-ppc.

cd /usr/include/asm
grep -n asm * | more

The documentation is gcc source.
Plaese get some new gcc's source,then open that.
*importance*
Read gcc/extend.texi.

There is much help.

More help is there(in gcc source).
cd gcc
grep -n asm | more

You will have much help there.

Kaoru


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2000-12-27 23:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-23  5:52 kerne-2.4.0-test13pre3 with gcc-2.97 Kaoru Fukui
     [not found] ` <20001223142145.T5858@coruscant.gnumonks.org>
2000-12-23 13:30   ` Kaoru Fukui
2000-12-24  3:29 ` Alexandre Oliva
2000-12-24 13:53   ` Kaoru Fukui
2000-12-24 15:20     ` Thomas Sailer
2000-12-24 15:19   ` Thomas Sailer
2000-12-24 18:08     ` Alexandre Oliva
2000-12-26  1:41       ` how to use macro in assemble language embedded in C? kerler
     [not found]         ` <20001226221757.Postino-028251@smtp01.highway.ne.jp>
2000-12-27  3:33           ` kerler
2000-12-27 15:50             ` Alexandre Oliva
2000-12-27 23:37       ` kerne-2.4.0-test13pre3 with gcc-2.97 Richard Henderson
2000-12-24 15:16 ` Thomas Sailer
  -- strict thread matches above, loose matches on Subject: below --
2000-12-27 11:04 how to use macro in assemble language embedded in C? Kaoru Fukui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).