summaryrefslogtreecommitdiff
path: root/lang/gcc/patches/patch-ao
blob: 3b29cbd8ad2cad5f35d9580515eb495bed7a2233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-ao,v 1.1 2000/09/15 23:58:48 tron Exp $

--- ../gcc-2.95.2/gcc/objc/objc-act.c.orig	Wed Apr 14 22:28:54 1999
+++ ../gcc-2.95.2/gcc/objc/objc-act.c	Sat Sep 16 00:17:43 2000
@@ -8399,8 +8399,11 @@
       pushdecl (decl);
       rest_of_decl_compilation (decl, 0, 0, 0);
 
-      /* Make following constant read-only (why not)?  */
-      readonly_data_section ();
+      /* Make following constant read-only, if not compiling PIC. */
+      if (flag_pic)
+	data_section();
+      else
+	readonly_data_section ();
 
       exp = build1 (ADDR_EXPR, string_type_node, decl);