diff --git a/BUILD.bazel b/BUILD.bazel index 5c52fc80094b..71a35fde0560 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -206,7 +206,7 @@ platform( # config_settings define a select() condition based on user-set constraint_values # see https://bazel.build/docs/configurable-attributes config_setting( - name = "aarch64-linux-anylibc-cross", + name = "aarch64-linux-glibc-cross", constraint_values = [ "@platforms//os:linux", "@platforms//cpu:aarch64", @@ -227,7 +227,7 @@ config_setting( ) config_setting( - name = "x86_64-linux-anylibc-cross", + name = "x86_64-linux-glibc-cross", constraint_values = [ "@platforms//os:linux", "@platforms//cpu:x86_64", @@ -240,9 +240,9 @@ selects.config_setting_group( # matches all cross build platforms name = "any-cross", match_any = [ - ":aarch64-linux-anylibc-cross", + ":aarch64-linux-glibc-cross", ":x86_64-linux-musl-cross", - ":x86_64-linux-anylibc-cross", + ":x86_64-linux-glibc-cross", ], visibility = ["//visibility:public"], ) diff --git a/build/cross_deps/libxcrypt/BUILD.libxcrypt.bazel b/build/cross_deps/libxcrypt/BUILD.libxcrypt.bazel index 933172eec78f..88880868add4 100644 --- a/build/cross_deps/libxcrypt/BUILD.libxcrypt.bazel +++ b/build/cross_deps/libxcrypt/BUILD.libxcrypt.bazel @@ -26,8 +26,11 @@ configure_make( configure_command = "configure", configure_in_place = True, configure_options = select({ - "@kong//:aarch64-linux-anylibc-cross": [ - "--host=aarch64-linux", + "@kong//:aarch64-linux-glibc-cross": [ + "--host=aarch64-unknown-linux-gnu", + ], + "@kong//:x86_64-linux-glibc-cross": [ + "--host=x86_64-unknown-linux-gnu", ], "@kong//:x86_64-linux-musl-cross": [ "--host=x86_64-linux-musl", diff --git a/build/cross_deps/libyaml/BUILD.libyaml.bazel b/build/cross_deps/libyaml/BUILD.libyaml.bazel index ad4e48560df3..57139745a48f 100644 --- a/build/cross_deps/libyaml/BUILD.libyaml.bazel +++ b/build/cross_deps/libyaml/BUILD.libyaml.bazel @@ -14,8 +14,11 @@ configure_make( configure_command = "configure", configure_in_place = True, configure_options = select({ - "@kong//:aarch64-linux-anylibc-cross": [ - "--host=aarch64-linux", + "@kong//:aarch64-linux-glibc-cross": [ + "--host=aarch64-unknown-linux-gnu", + ], + "@kong//:x86_64-linux-glibc-cross": [ + "--host=x86_64-unknown-linux-gnu", ], "@kong//:x86_64-linux-musl-cross": [ "--host=x86_64-linux-musl", diff --git a/build/openresty/BUILD.openresty.bazel b/build/openresty/BUILD.openresty.bazel index cc4107cabc7c..ab9b2d043c90 100644 --- a/build/openresty/BUILD.openresty.bazel +++ b/build/openresty/BUILD.openresty.bazel @@ -152,7 +152,7 @@ CONFIGURE_OPTIONS = [ "--add-module=$$EXT_BUILD_ROOT$$/external/lua-kong-nginx-module", "--add-module=$$EXT_BUILD_ROOT$$/external/lua-kong-nginx-module/stream", ] + select({ - "@kong//:aarch64-linux-anylibc-cross": [ + "@kong//:aarch64-linux-glibc-cross": [ "--crossbuild=Linux:aarch64", "--with-endian=little", "--with-int=4", @@ -165,6 +165,19 @@ CONFIGURE_OPTIONS = [ "--with-time-t=8", "--with-sys-nerr=132", ], + "@kong//:x86_64-linux-glibc-cross": [ + "--crossbuild=Linux:x86_64", + "--with-endian=little", + "--with-int=4", + "--with-long=8", + "--with-long-long=8", + "--with-ptr-size=8", + "--with-sig-atomic-t=4", + "--with-size-t=8", + "--with-off-t=8", + "--with-time-t=8", + "--with-sys-nerr=132", + ], "@kong//:x86_64-linux-musl-cross": [ "--crossbuild=Linux:x86_64", "--with-endian=little", @@ -188,7 +201,7 @@ CONFIGURE_OPTIONS = [ }) + select({ # any cross build that migrated to use libxcrypt needs those flags # alpine uses different libc so doesn't need it - "@kong//:aarch64-linux-anylibc-cross": [ + "@kong//:aarch64-linux-glibc-cross": [ "--with-cc-opt=\"-I$$EXT_BUILD_DEPS$$/libxcrypt/include\"", "--with-ld-opt=\"-L$$EXT_BUILD_DEPS$$/libxcrypt/lib\"", ], diff --git a/build/openresty/openssl/openssl.bzl b/build/openresty/openssl/openssl.bzl index 62aa72f34dc8..400e2e880ef6 100644 --- a/build/openresty/openssl/openssl.bzl +++ b/build/openresty/openssl/openssl.bzl @@ -11,9 +11,12 @@ load("@kong_bindings//:variables.bzl", "KONG_VAR") # Read https://wiki.openssl.org/index.php/Compilation_and_Installation CONFIGURE_OPTIONS = select({ - "@kong//:aarch64-linux-anylibc-cross": [ + "@kong//:aarch64-linux-glibc-cross": [ "linux-aarch64", ], + "@kong//:x86_64-linux-glibc-cross": [ + "linux-x86_64", + ], # no extra args needed for "@kong//:x86_64-linux-musl-cross" or non-cross builds "//conditions:default": [], }) + [