public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] aix: remove libgomp and libatomic archives before creating FAT archives
@ 2020-10-08  9:06 CHIGOT, CLEMENT
  2020-10-10 19:29 ` David Edelsohn
  2020-10-10 23:56 ` David Edelsohn
  0 siblings, 2 replies; 3+ messages in thread
From: CHIGOT, CLEMENT @ 2020-10-08  9:06 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Edelsohn

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

libgomp and libatomic might be in use during the build. Thus, ar commands
will failed to add new objetcs to it as the file is considered busy.
Deleting it and recreating it with both architectures fixes that.

libatomic/Changelog:
2020-08-17 Clement Chigot <clement.chigot@atos.net>
 * config/t-aix: Deleting libatomic before creating FAT library.

libgomp/Changelog:
2020-08-17 Clement Chigot <clement.chigot@atos.net>
 * config/t-aix: Deleting libgomp before creating FAT library.


Clément Chigot
ATOS Bull SAS
1 rue de Provence - 38432 Échirolles - France


[-- Attachment #2: 0001-aix-remove-libgomp-and-libatomic-archives-before-cre.patch --]
[-- Type: application/octet-stream, Size: 2490 bytes --]

From ba92728f756d53d6bb1f8bae653aa8f42797ee97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= <clement.chigot@atos.net>
Date: Tue, 1 Sep 2020 11:32:09 +0200
Subject: [PATCH] aix: remove libgomp and libatomic archives before creating
 FAT archives

libgomp and libatomic might be in use during the build. Thus, ar commands
will failed to add new objetcs to it as the file is considered busy.
Deleting it and recreating it with both architectures fixes that.

libatomic/Changelog:
2020-08-17 Clement Chigot <clement.chigot@atos.net>
 * config/t-aix: Deleting libatomic before creating FAT library.

libgomp/Changelog:
2020-08-17 Clement Chigot <clement.chigot@atos.net>
 * config/t-aix: Deleting libgomp before creating FAT library.
---
 libatomic/config/t-aix | 3 +++
 libgomp/config/t-aix   | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/libatomic/config/t-aix b/libatomic/config/t-aix
index 08607727574..f2163f1de8e 100644
--- a/libatomic/config/t-aix
+++ b/libatomic/config/t-aix
@@ -5,6 +5,9 @@ BITS=$(shell if test -z "`$(CC) -x c -E /dev/null -g3 -o - | grep 64BIT`" ; then
 MAJOR=1
 ARX=$(shell echo $(AR) | sed -e 's/-X[^ ]*//g')
 all-local:
+	rm .libs/$(PACKAGE).a ../pthread/$(PACKAGE)/.libs/$(PACKAGE).a
+	$(ARX) -X32_64 rc .libs/$(PACKAGE).a .libs/$(PACKAGE).so.$(MAJOR)
+	$(ARX) -X32_64 rc ../pthread/$(PACKAGE)/.libs/$(PACKAGE).a ../pthread/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
 	$(ARX) -X$(BITS) rc .libs/$(PACKAGE).a ../ppc$(BITS)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
 	$(ARX) -X$(BITS) rc ../pthread/$(PACKAGE)/.libs/$(PACKAGE).a ../pthread/ppc$(BITS)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
 endif
diff --git a/libgomp/config/t-aix b/libgomp/config/t-aix
index 35bff8bb019..3bc16e439f5 100644
--- a/libgomp/config/t-aix
+++ b/libgomp/config/t-aix
@@ -4,6 +4,9 @@ BITS=$(shell if test -z "`$(CC) -x c -E /dev/null -g3 -o - | grep 64BIT`" ; then
 ARX=$(shell echo $(AR) | sed -e 's/-X[^ ]*//g')
 MAJOR=$(firstword $(subst :, ,$(libtool_VERSION)))
 all-local:
+	rm .libs/$(PACKAGE).a ../pthread/$(PACKAGE)/.libs/$(PACKAGE).a
+	$(ARX) -X32_64 rc .libs/$(PACKAGE).a .libs/$(PACKAGE).so.$(MAJOR)
+	$(ARX) -X32_64 rc ../pthread/$(PACKAGE)/.libs/$(PACKAGE).a ../pthread/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
 	$(ARX) -X$(BITS) rc .libs/$(PACKAGE).a ../ppc$(BITS)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
 	$(ARX) -X$(BITS) rc ../pthread/$(PACKAGE)/.libs/$(PACKAGE).a ../pthread/ppc$(BITS)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
 endif
-- 
2.25.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] aix: remove libgomp and libatomic archives before creating FAT archives
  2020-10-08  9:06 [PATCH] aix: remove libgomp and libatomic archives before creating FAT archives CHIGOT, CLEMENT
@ 2020-10-10 19:29 ` David Edelsohn
  2020-10-10 23:56 ` David Edelsohn
  1 sibling, 0 replies; 3+ messages in thread
From: David Edelsohn @ 2020-10-10 19:29 UTC (permalink / raw)
  To: CHIGOT, CLEMENT; +Cc: gcc-patches

 This solution doesn't really appeal to me, but there aren't any good options.

AIX caches shared objects in memory for faster startup.  If the
archive file permissions do not include read-other (world readable),
the shared object is not cached.  But using this option might cause
permission problems at installation.  One would need to juggle file
permissions during the build.

The AIX slibclean command will clear all cached shared objects, but it
requires root privileges and is a global action.

- David

On Thu, Oct 8, 2020 at 5:06 AM CHIGOT, CLEMENT <clement.chigot@atos.net> wrote:
>
> libgomp and libatomic might be in use during the build. Thus, ar commands
> will failed to add new objetcs to it as the file is considered busy.
> Deleting it and recreating it with both architectures fixes that.
>
> libatomic/Changelog:
> 2020-08-17 Clement Chigot <clement.chigot@atos.net>
>  * config/t-aix: Deleting libatomic before creating FAT library.
>
> libgomp/Changelog:
> 2020-08-17 Clement Chigot <clement.chigot@atos.net>
>  * config/t-aix: Deleting libgomp before creating FAT library.
>
>
> Clément Chigot
> ATOS Bull SAS
> 1 rue de Provence - 38432 Échirolles - France
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] aix: remove libgomp and libatomic archives before creating FAT archives
  2020-10-08  9:06 [PATCH] aix: remove libgomp and libatomic archives before creating FAT archives CHIGOT, CLEMENT
  2020-10-10 19:29 ` David Edelsohn
@ 2020-10-10 23:56 ` David Edelsohn
  1 sibling, 0 replies; 3+ messages in thread
From: David Edelsohn @ 2020-10-10 23:56 UTC (permalink / raw)
  To: CHIGOT, CLEMENT; +Cc: gcc-patches

It also is confusing for the patch to perform

$(ARX) -X32_64

when immediately before the fragment created ARX by explicitly
stripping -X32_64.  If it's going to perform

ar -X32_64

it should use the normal $(AR) variable.

Thanks, David

On Thu, Oct 8, 2020 at 5:06 AM CHIGOT, CLEMENT <clement.chigot@atos.net> wrote:
>
> libgomp and libatomic might be in use during the build. Thus, ar commands
> will failed to add new objetcs to it as the file is considered busy.
> Deleting it and recreating it with both architectures fixes that.
>
> libatomic/Changelog:
> 2020-08-17 Clement Chigot <clement.chigot@atos.net>
>  * config/t-aix: Deleting libatomic before creating FAT library.
>
> libgomp/Changelog:
> 2020-08-17 Clement Chigot <clement.chigot@atos.net>
>  * config/t-aix: Deleting libgomp before creating FAT library.
>
>
> Clément Chigot
> ATOS Bull SAS
> 1 rue de Provence - 38432 Échirolles - France
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-10 23:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08  9:06 [PATCH] aix: remove libgomp and libatomic archives before creating FAT archives CHIGOT, CLEMENT
2020-10-10 19:29 ` David Edelsohn
2020-10-10 23:56 ` David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).