diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7deb6fdc7660ccb03dd7ab0db3dd1c4e9287f8ed..95529f5e373e98cf0ac0774c23bd021447f84f3c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-11  Bob Wilson  <bob.wilson@acm.org>
+	
+	* config/xtensa/xtensa.c (override_options): Set flag_shlib.
+	
 2008-01-11  James E. Wilson  <wilson@specifix.com>
 
 	PR target/26015
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 62eadbb97982a14a62d2761cf6c5942fec1ee935..76cd5f4b38f8e3f9dfd98681fd65ef32dc6d97db 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -1908,6 +1908,8 @@ override_options (void)
   /* There's no need for -fPIC (as opposed to -fpic) on Xtensa.  */
   if (flag_pic > 1)
     flag_pic = 1;
+  if (flag_pic && !flag_pie)
+    flag_shlib = 1;
 
   /* Hot/cold partitioning does not work on this architecture, because of
      constant pools (the load instruction cannot necessarily reach that far).