Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vEt42-002aoh-89 for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Oct 2025 17:37:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vEt41-00Gx2P-7H for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Oct 2025 17:37:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vEt0k-00Grax-Jv for pgsql-hackers@lists.postgresql.org; Fri, 31 Oct 2025 17:34:01 +0000 Received: from lahtoruutu.iki.fi ([185.185.170.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vEt0h-005Hge-2C for pgsql-hackers@lists.postgresql.org; Fri, 31 Oct 2025 17:34:01 +0000 Received: from [10.0.2.15] (unknown [130.41.208.2]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4cyp4L73PZz49PvQ; Fri, 31 Oct 2025 19:33:54 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1761932035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=03LM6DqTjnPXhWOrMsGc8A1x00tcwdAx6a8XP6N10YA=; b=Usgf6S2a/TPSyrZoTBodl0t4jA2Yl0uXMUQ+mr3Y1Xmnpan69jAlwMv6EDP21Hev2/pFGi uexb9oWyig12+zxI/L9WWUrr6qLEK/W1oNCkX/oK6JKv1Xbbiw7nPw1JUBkbg9+0GdkwFQ aIo2rB34e07cF3cRhG9xKq4r/dKo6HR2SrrNzT8FNeofFkbaZ1M1lhrNmWvyeaNofg2bMS qO/pvDgVkueajBPvRUTGYa3HuFwmovIHwi7RwrMGde8WpNLb8OvQR1+HA1tIzK3wZAr31Y dUDslT7tSmUQpOluTWi0UyaIYEyuo9V2n/zL77MmaqLn5WosA5q0vrG7niLdIw== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1761932035; a=rsa-sha256; cv=none; b=sA0LQYXs446ar8GXmvHWkAWTf7VBc1T+rHfAh+HpgEQxco80RhNQ2k7oXBsIqYMpx8ZNzx tpjClZxgZC/IfF4ccwFvTBi0YfljGZPYZr4g7szx0D40PxvYY+7DP1cgJ4FpgUkl/q3/HB BHgYuSV9T09wlrdCy6E+QbgDbqoUHEk2B76oENho8gdHyiIw/rkuZtvtVufsBCYAoy84Ph NNF4oMbUsEcIVRWRQYWs1CUutS1QivbQ4KdW3jdplMse51fCVRh1vdt+kHrkwKNGppO5WN aWv57KMLq917A4W4jF5clsxvswBW5WpfsT3UMJnh8HeiEWW/E0cAew1/wPCytA== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1761932035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=03LM6DqTjnPXhWOrMsGc8A1x00tcwdAx6a8XP6N10YA=; b=J6f8StqK4G7S7dots2X32XmXZlsGciDTl/E/ukH2EqLPSCU0ZsjSv9auJ4EwYFRHMCSLp6 +b3xEsmYNf4vW7cpQbPQjB7HpuNjUWD7QdyZUYmn/YA89ECNE+Gl9RvBBELZxVLHYu/I6O 6qN5hE7XhFprqi68da8kthvRXm+1xy1GK4FqPAA/3SZEwZv7c178I59bXtNsQGTOIxukd1 g/nd5VClaKObuIwH3dQXUknwOP7aJSiNqQtIqkEFQ/NPMpeFP23IhlkAvrVxRTu3Vb0Pfo E69qiTPp9eRHbS8tmq373f5CLBpjamFZCnXu742rZU4t4hbAz0bpD0/YZ1ge0A== Message-ID: <04df3928-2356-4923-8245-ea91140fd956@iki.fi> Date: Fri, 31 Oct 2025 19:33:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: AIX support To: AIX PG user , pgsql-hackers@lists.postgresql.org References: <5891d1c8-d1cc-4dd1-9e4e-744708f791c7@eisentraut.org> <176062848036.68507.311595310346050481.pgcf@coridan.postgresql.org> Content-Language: en-US From: Heikki Linnakangas In-Reply-To: <176062848036.68507.311595310346050481.pgcf@coridan.postgresql.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 16/10/2025 18:28, AIX PG user wrote: > diff --git a/src/template/aix b/src/template/aix > new file mode 100644 > index 00000000000..bfc193348f4 > --- /dev/null > +++ b/src/template/aix > @@ -0,0 +1,7 @@ > +# This file is referred for specific flags wrt to AIX build process like > +# cflags. > +# src/template/aix > + > +# Extra CFLAGS for code that will go into a shared library > +# With optimization, the MemSet() and MemSetAlign() perform better. > +CFLAGS_SL=" -O2 " > -- This looks weird. Sure, "-O2" makes things faster, but we shouldn't force that here. If you want optimizations, you should use pass CFLAGS="-O2" or CFLAGS="-O3" to configure. And why the special mention of MemSet() and MemSetAlign()? > @@ -95,6 +97,24 @@ libpostgres.a: postgres > > endif # win32 > > +ifeq ($(PORTNAME), aix) > + > +postgres: $(POSTGRES_IMP) > + $(CC) $(CFLAGS) $(call expand_subsys,$(OBJS)) $(LDFLAGS) -Wl,-bE:$(top_builddir)/src/backend/$(POSTGRES_IMP) $(LIBS) -Wl,-brtllib -o $@ > + > +# Linking to a single .o with -r is a lot faster than building a .a or passing > +# all objects to MKLDEXPORT. > +# > +# It looks alluring to use $(CC) -r instead of ld -r, but that doesn't > +# trivially work with gcc, due to gcc specific static libraries linked in with > +# -r. > +$(POSTGRES_IMP): $(OBJS) > + ld -r -o SUBSYS.o $(call expand_subsys,$^) > + $(MKLDEXPORT) SUBSYS.o . > $@ > + @rm -f SUBSYS.o > + > +endif # aix > + > $(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport I see there's some references to MAKE_EXPORTS in src/backend/Makefile. They seem related to MKLDEXPORT, but we never set MAKE_EXPORTS. Are they still needed? - Heikki