From a5e172a49c6dfbcefce5f2b18d4ef13862002a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Fri, 1 Oct 2021 23:32:35 +0200 Subject: [PATCH 1/4] Remove libatomic_ops dependency libatomic_ops is no longer required for building bdwgc starting with 8.0.0. We're using newer versions now, so there's no need to pull in libatomic_ops. --- docker/Makefile | 3 +-- docker/alpine.Dockerfile | 3 --- linux/Dockerfile | 6 ----- linux/Makefile | 2 -- omnibus/config/software/bdw-gc.rb | 2 -- omnibus/config/software/libatomic_ops.rb | 32 ------------------------ 6 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 omnibus/config/software/libatomic_ops.rb diff --git a/docker/Makefile b/docker/Makefile index cffc5b30..75f16ee9 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -14,13 +14,12 @@ DOCKER_TAG ?= $(CRYSTAL_VERSION) ## How to tag the docker image (examples: `0.27 DOCKER_REPOSITORY ?= crystallang/crystal ## Docker hub repository to commit image GC_VERSION = v8.0.4 -LIBATOMIC_OPS_VERSION = v7.6.10 OUTPUT_DIR := build BUILD_CONTEXT := $(CURDIR)/build-context BUILD_ARGS_UBUNTU64 := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/ubuntu64 --build-arg base_docker_image=ubuntu:focal BUILD_ARGS_UBUNTU32 := --build-arg crystal_deb=crystal.deb $(BUILD_CONTEXT)/ubuntu32 --build-arg base_docker_image=i386/ubuntu:bionic -BUILD_ARGS_ALPINE := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/alpine --build-arg gc_version=$(GC_VERSION) --build-arg libatomic_ops_version=$(LIBATOMIC_OPS_VERSION) +BUILD_ARGS_ALPINE := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/alpine --build-arg gc_version=$(GC_VERSION) DOCKER_TAG_UBUNTU := $(DOCKER_REPOSITORY):$(DOCKER_TAG) DOCKER_TAG_ALPINE := $(DOCKER_REPOSITORY):$(DOCKER_TAG)-alpine diff --git a/docker/alpine.Dockerfile b/docker/alpine.Dockerfile index 488ea2bc..8cf340d7 100644 --- a/docker/alpine.Dockerfile +++ b/docker/alpine.Dockerfile @@ -13,13 +13,10 @@ RUN \ # Build libgc ARG gc_version -ARG libatomic_ops_version COPY files/feature-thread-stackbottom-upstream.patch /tmp/ RUN git clone https://github.com/ivmai/bdwgc \ && cd bdwgc \ && git checkout ${gc_version} \ - && git clone https://github.com/ivmai/libatomic_ops \ - && (cd libatomic_ops && git checkout ${libatomic_ops_version}) \ \ && patch -p1 < /tmp/feature-thread-stackbottom-upstream.patch \ \ diff --git a/linux/Dockerfile b/linux/Dockerfile index 497b7a32..920324ea 100644 --- a/linux/Dockerfile +++ b/linux/Dockerfile @@ -16,13 +16,10 @@ RUN apt-get install -y --allow-downgrades libcurl3-gnutls=7.64.0-4+deb10u2 # Build libgc ARG gc_version -ARG libatomic_ops_version COPY files/feature-thread-stackbottom-upstream.patch /tmp/ RUN git clone https://github.com/ivmai/bdwgc \ && cd bdwgc \ && git checkout ${gc_version} \ - && git clone https://github.com/ivmai/libatomic_ops \ - && (cd libatomic_ops && git checkout ${libatomic_ops_version}) \ \ && patch -p1 < /tmp/feature-thread-stackbottom-upstream.patch \ \ @@ -48,12 +45,9 @@ ENV CFLAGS="-fPIC -pipe ${release:+-O2}" # Build libgc (again, this time for musl) ARG gc_version -ARG libatomic_ops_version RUN git clone https://github.com/ivmai/bdwgc \ && cd bdwgc \ && git checkout ${gc_version} \ - && git clone https://github.com/ivmai/libatomic_ops \ - && (cd libatomic_ops && git checkout ${libatomic_ops_version}) \ \ && ./autogen.sh \ && ./configure --disable-debug --disable-shared --enable-large-config \ diff --git a/linux/Makefile b/linux/Makefile index c02c1836..07c6314b 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -23,7 +23,6 @@ PREVIOUS_CRYSTAL_RELEASE_LINUX32_TARGZ ?= https://github.com/crystal-lang/crysta SHARDS_VERSION = v0.15.0 GC_VERSION = v8.0.4 -LIBATOMIC_OPS_VERSION = v7.6.10 LIBPCRE_VERSION = 8.45 OUTPUT_DIR = build @@ -39,7 +38,6 @@ BUILD_ARGS_COMMON = $(DOCKER_BUILD_ARGS) \ --build-arg crystal_sha1=$(CRYSTAL_SHA1) \ --build-arg shards_version=$(SHARDS_VERSION) \ --build-arg gc_version=$(GC_VERSION) \ - --build-arg libatomic_ops_version=$(LIBATOMIC_OPS_VERSION) \ --build-arg package_iteration=$(PACKAGE_ITERATION) BUILD_ARGS64 = $(BUILD_ARGS_COMMON) \ diff --git a/omnibus/config/software/bdw-gc.rb b/omnibus/config/software/bdw-gc.rb index 2730fe08..99fe5526 100644 --- a/omnibus/config/software/bdw-gc.rb +++ b/omnibus/config/software/bdw-gc.rb @@ -20,8 +20,6 @@ source md5: "67a5093e2f9f381bd550aa891d00b54b" end -dependency "libatomic_ops" - relative_path "gc-#{version}" env = with_standard_compiler_flags(with_embedded_path) diff --git a/omnibus/config/software/libatomic_ops.rb b/omnibus/config/software/libatomic_ops.rb deleted file mode 100644 index 15f92508..00000000 --- a/omnibus/config/software/libatomic_ops.rb +++ /dev/null @@ -1,32 +0,0 @@ -name "libatomic_ops" -default_version "7.6.10" -skip_transitive_dependency_licensing true - -source :url => "https://github.com/ivmai/libatomic_ops/releases/download/v#{version}/libatomic_ops-#{version}.tar.gz" - -version "7.4.10" do - source md5: "47dcc36e1f77ab0efdee5d99888b3ffe" -end - -version "7.6.6" do - source md5: "4514d85d14e21af05d59877c9ded5abc" -end - -version "7.6.10" do - source md5: "90a78a84d9c28ce11f331c25289bfbd0" -end - -relative_path "libatomic_ops-#{version}" - -env = with_standard_compiler_flags -env["CFLAGS"] << " -fPIC -arch arm64 -arch x86_64" -env["CPPFLAGS"] = env["CPPFLAGS"].gsub("-arch arm64 -arch x86_64", "") - -build do - command "./configure" \ - " --disable-dependency-tracking" \ - " --disable-docs" \ - " --prefix=#{install_dir}/embedded", env: env - make "-j #{workers} SUBDIRS=src" # Skipping tests - make "install SUBDIRS=src" -end From b0f30b943d9985ae9c4c196f558f0881a8231d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 6 Oct 2021 18:55:01 +0200 Subject: [PATCH 2/4] fixup! Merge branch 'master' into refactor/remove-libatomic_ops --- docker/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/Makefile b/docker/Makefile index f13414e8..3c93557f 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -19,7 +19,6 @@ OUTPUT_DIR := build BUILD_CONTEXT := $(CURDIR)/build-context BUILD_ARGS_UBUNTU64 := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/ubuntu64 --build-arg base_docker_image=ubuntu:focal BUILD_ARGS_ALPINE := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/alpine --build-arg gc_version=$(GC_VERSION) -======= DOCKER_TAG_ALPINE := $(DOCKER_REPOSITORY):$(DOCKER_TAG)-alpine .PHONY: all64 From 16dbdca5b9eb4a4f170c90dc1d2436ef54de9549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Wed, 6 Oct 2021 18:55:57 +0200 Subject: [PATCH 3/4] fixup! Merge branch 'master' into refactor/remove-libatomic_ops --- docker/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/Makefile b/docker/Makefile index 3c93557f..3870a343 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -19,6 +19,7 @@ OUTPUT_DIR := build BUILD_CONTEXT := $(CURDIR)/build-context BUILD_ARGS_UBUNTU64 := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/ubuntu64 --build-arg base_docker_image=ubuntu:focal BUILD_ARGS_ALPINE := --build-arg crystal_targz=crystal.tar.gz $(BUILD_CONTEXT)/alpine --build-arg gc_version=$(GC_VERSION) +DOCKER_TAG_UBUNTU := $(DOCKER_REPOSITORY):$(DOCKER_TAG) DOCKER_TAG_ALPINE := $(DOCKER_REPOSITORY):$(DOCKER_TAG)-alpine .PHONY: all64 From d4a8ca041dfd771385274da2d64ca67ffcbeaea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Thu, 7 Oct 2021 21:55:39 +0200 Subject: [PATCH 4/4] Remove extra empty line --- linux/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/linux/Dockerfile b/linux/Dockerfile index 0bf38073..15c66718 100644 --- a/linux/Dockerfile +++ b/linux/Dockerfile @@ -20,7 +20,6 @@ ARG gc_version RUN git clone https://github.com/ivmai/bdwgc \ && cd bdwgc \ && git checkout ${gc_version} \ - \ && ./autogen.sh \ && ./configure --disable-debug --disable-shared --enable-large-config \ && make -j$(nproc)