--- jdk23u-jdk-23.0.1-ga/make/autoconf/flags-ldflags.m4.orig
+++ jdk23u-jdk-23.0.1-ga/make/autoconf/flags-ldflags.m4
@@ -122,10 +122,12 @@
 
   # Setup LDFLAGS for linking executables
   if test "x$TOOLCHAIN_TYPE" = xgcc; then
-    # Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
-    # java heap.
-    if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
-      EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -pie"
+    if test "x$OPENJDK_TARGET_OS" != xsolaris; then
+      # Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
+      # java heap.
+      if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
+        EXECUTABLE_LDFLAGS="$EXECUTABLE_LDFLAGS -pie"
+      fi
     fi
   fi