--- Makefile_orig	2023-04-21 03:08:17.827256097 +0000
+++ Makefile	2023-04-21 03:20:33.084448073 +0000
@@ -637,7 +637,7 @@
 export prefix bindir sharedir sysconfdir perllibdir localedir
 
 # Set our default programs
-CC = cc
+CC = gcc
 AR = ar
 RM = rm -f
 DIFF = diff
@@ -1349,8 +1349,8 @@
 # tweaked by config.* below as well as the command-line, both of
 # which'll override these defaults.
 # Older versions of GCC may require adding "-std=gnu99" at the end.
-CFLAGS = -g -O2 -Wall
-LDFLAGS =
+CFLAGS = -std=gnu99 -O2 -maix64
+LDFLAGS = -L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-bbigtoc -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"
 CC_LD_DYNPATH = -Wl,-rpath,
 BASIC_CFLAGS = -I.
 BASIC_LDFLAGS =
--- Makefile_orig	2023-05-02 04:37:49.710446760 +0000
+++ Makefile	2023-05-02 04:43:15.187037436 +0000
@@ -1686,7 +1686,7 @@
 		ifdef NEEDS_LIBINTL_BEFORE_LIBICONV
 			ICONV_LINK += -lintl
 		endif
-		EXTLIBS += $(ICONV_LINK) -liconv
+                EXTLIBS += $(ICONV_LINK) /opt/freeware/lib/libiconv.a
 	endif
 endif
 ifdef ICONV_OMITS_BOM
@@ -1697,7 +1697,7 @@
 endif
 ifndef NO_GETTEXT
 ifndef LIBC_CONTAINS_LIBINTL
-	EXTLIBS += -lintl
+	EXTLIBS += /opt/freeware/lib/libintl.a
 endif
 endif
 ifdef NEEDS_SOCKET
