diff --git a/common/build-profiles/ppc64-musl.sh b/common/build-profiles/ppc64-musl.sh new file mode 100644 index 00000000000..e3978fe9365 --- /dev/null +++ b/common/build-profiles/ppc64-musl.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mcpu=970 -mtune=power9 -maltivec -mlong-double-64 -mabi=elfv2" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="powerpc64-unknown-linux-musl" +XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/ppc64le-musl.sh b/common/build-profiles/ppc64le-musl.sh new file mode 100644 index 00000000000..146527d84f8 --- /dev/null +++ b/common/build-profiles/ppc64le-musl.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mcpu=powerpc64le -mtune=power9 -maltivec -mlong-double-64 -mabi=elfv2" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="powerpc64le-unknown-linux-musl" +XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/ppc64le.sh b/common/build-profiles/ppc64le.sh new file mode 100644 index 00000000000..5d17214eccc --- /dev/null +++ b/common/build-profiles/ppc64le.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mcpu=powerpc64le -mtune=power9 -maltivec -mabi=elfv2" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="powerpc64le-unknown-linux-gnu" +XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh index 92f5fe71508..d3480785a41 100644 --- a/common/build-style/cmake.sh +++ b/common/build-style/cmake.sh @@ -13,6 +13,8 @@ do_configure() { aarch64*) _CMAKE_SYSTEM_PROCESSOR=aarch64 ;; arm*) _CMAKE_SYSTEM_PROCESSOR=arm ;; mips*) _CMAKE_SYSTEM_PROCESSOR=mips ;; + ppc64le*) _CMAKE_SYSTEM_PROCESSIR=ppc64le ;; + ppc64*) _CMAKE_SYSTEM_PROCESSOR=ppc64 ;; *) _CMAKE_SYSTEM_PROCESSOR=generic ;; esac if [ -x "${XBPS_CROSS_BASE}/usr/bin/wx-config-gtk3" ]; then diff --git a/common/build-style/meson.sh b/common/build-style/meson.sh index b2f978bbd80..46582f4b1f1 100644 --- a/common/build-style/meson.sh +++ b/common/build-style/meson.sh @@ -21,6 +21,13 @@ do_configure() { i686*) _MESON_CPU_FAMILY=x86 ;; + ppc64le) + _MESON_CPU_FAMILY=ppc64 + ;; + ppc64) + _MESON_TARGET_ENDIAN=big + _MESON_CPU_FAMILY=ppc64 + ;; *) # if we reached here that means that the cpu and cpu_family # are the same like 'x86_64' and 'aarch64' diff --git a/common/cross-profiles/ppc64-musl.sh b/common/cross-profiles/ppc64-musl.sh new file mode 100644 index 00000000000..5559feddeec --- /dev/null +++ b/common/cross-profiles/ppc64-musl.sh @@ -0,0 +1,9 @@ +# Cross build profile for ppc64 big-endian musl. + +XBPS_TARGET_MACHINE="ppc64-musl" +XBPS_CROSS_TRIPLET="powerpc64-linux-musl" +XBPS_CROSS_CFLAGS="-mcpu=970 -mtune=power9 -maltivec -mlong-double-64 -mabi=elfv2" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="powerpc64-unknown-linux-musl" diff --git a/common/cross-profiles/ppc64le-musl.sh b/common/cross-profiles/ppc64le-musl.sh new file mode 100644 index 00000000000..fb582d2f0a1 --- /dev/null +++ b/common/cross-profiles/ppc64le-musl.sh @@ -0,0 +1,9 @@ +# Cross build profile for ppc64 little-endian musl. + +XBPS_TARGET_MACHINE="ppc64le-musl" +XBPS_CROSS_TRIPLET="powerpc64le-linux-musl" +XBPS_CROSS_CFLAGS="-mcpu=powerpc64le -mtune=power9 -maltivec -mlong-double-64 -mabi=elfv2" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="powerpc64le-unknown-linux-musl" diff --git a/common/cross-profiles/ppc64le.sh b/common/cross-profiles/ppc64le.sh new file mode 100644 index 00000000000..bd770552f76 --- /dev/null +++ b/common/cross-profiles/ppc64le.sh @@ -0,0 +1,9 @@ +# Cross build profile for ppc64 little-endian GNU. + +XBPS_TARGET_MACHINE="ppc64le" +XBPS_CROSS_TRIPLET="powerpc64le-linux-gnu" +XBPS_CROSS_CFLAGS="-mcpu=powerpc64le -mtune=power9 -maltivec -mabi=elfv2" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="powerpc64le-unknown-linux-gnu" diff --git a/common/environment/build-style/go.sh b/common/environment/build-style/go.sh index 871870a6842..3e6c64f5c8f 100644 --- a/common/environment/build-style/go.sh +++ b/common/environment/build-style/go.sh @@ -8,6 +8,8 @@ case "$XBPS_TARGET_MACHINE" in armv7*) export GOARCH=arm; export GOARM=7;; i686*) export GOARCH=386;; x86_64*) export GOARCH=amd64;; + ppc64le*) export GOARCH=ppc64le;; + ppc64*) export GOARCH=ppc64;; esac export GOPATH="${wrksrc}/_build-${pkgname}-xbps" diff --git a/common/environment/configure/autoconf_cache/powerpc-common b/common/environment/configure/autoconf_cache/powerpc-common new file mode 100644 index 00000000000..efa299c664b --- /dev/null +++ b/common/environment/configure/autoconf_cache/powerpc-common @@ -0,0 +1,14 @@ +# glib +ac_cv_alignof_guint32=4 +ac_cv_alignof_guint64=8 +ac_cv_alignof_unsigned_long=4 + +# at-spi2-core +ac_cv_alignof_char=1 +ac_cv_alignof_dbind_pointer=4 +ac_cv_alignof_dbind_struct=1 +ac_cv_alignof_dbus_bool_t=4 +ac_cv_alignof_dbus_int16_t=2 +ac_cv_alignof_dbus_int32_t=4 +ac_cv_alignof_dbus_int64_t=8 +ac_cv_alignof_double=8 diff --git a/common/environment/configure/autoconf_cache/powerpc-linux b/common/environment/configure/autoconf_cache/powerpc-linux new file mode 100644 index 00000000000..a9f89cb5d47 --- /dev/null +++ b/common/environment/configure/autoconf_cache/powerpc-linux @@ -0,0 +1,16 @@ +# general +ac_cv_va_val_copy=${ac_cv_va_val_copy=yes} + +# startup-notification +lf_cv_sane_realloc=yes + +# glib +glib_cv_stack_grows=${glib_cv_stack_grows=no} +glib_cv_uscore=${glib_cv_uscore=no} +glib_cv_va_val_copy=${glib_cv_va_val_copy=yes} + +# lftp +lftp_cv_va_val_copy=${lftp_cv_va_val_copy=yes} + +# slrn +slrn_cv_va_val_copy=${slrn_cv_va_val_copy=yes} diff --git a/common/environment/configure/autoconf_cache/powerpc64-linux b/common/environment/configure/autoconf_cache/powerpc64-linux new file mode 100644 index 00000000000..820a4b84403 --- /dev/null +++ b/common/environment/configure/autoconf_cache/powerpc64-linux @@ -0,0 +1,41 @@ +ac_cv_sizeof_char=${ac_cv_sizeof_char=1} +ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p=8} +ac_cv_sizeof_double=${ac_cv_sizeof_double=8} +ac_cv_sizeof_float=${ac_cv_sizeof_float=4} +ac_cv_sizeof_int=${ac_cv_sizeof_int=4} +ac_cv_sizeof_long=${ac_cv_sizeof_long=8} +ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=16} +ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=8} +ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8} +ac_cv_sizeof_long_long_int=${ac_cv_sizeof_long_long_int=8} +ac_cv_sizeof_short=${ac_cv_sizeof_short=2} +ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2} +ac_cv_sizeof_signed_char=${ac_cv_sizeof_signed_char=1} +ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1} +ac_cv_sizeof_unsigned_int=${ac_cv_sizeof_unsigned_int=4} +ac_cv_sizeof_unsigned_long=${ac_cv_sizeof_unsigned_long=8} +ac_cv_sizeof_unsigned_long_int=${ac_cv_sizeof_unsigned_long_int=8} +ac_cv_sizeof_unsigned_long_long_int=${ac_cv_sizeof_unsigned_long_long_int=8} +ac_cv_sizeof_unsigned_short=${ac_cv_sizeof_unsigned_short=2} +ac_cv_sizeof_unsigned_short_int=${ac_cv_sizeof_unsigned_short_int=2} +ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=8} + +# screen +screen_cv_sys_bcopy_overlap=${screen_cv_sys_bcopy_overlap=no} +screen_cv_sys_memcpy_overlap=${screen_cv_sys_memcpy_overlap=no} +screen_cv_sys_memmove_overlap=${screen_cv_sys_memmove_overlap=no} +screen_cv_sys_fifo_broken_impl=${screen_cv_sys_fifo_broken_impl=yes} +screen_cv_sys_fifo_usable=${screen_cv_sys_fifo_usable=yes} +screen_cv_sys_select_broken_retval=${screen_cv_sys_select_broken_retval=no} +screen_cv_sys_sockets_nofs=${screen_cv_sys_sockets_nofs=no} +screen_cv_sys_sockets_usable=${screen_cv_sys_sockets_usable=yes} +screen_cv_sys_terminfo_used=${screen_cv_sys_terminfo_used=yes} + +# libpcap +ac_cv_linux_vers=${ac_cv_linux_vers=2} + +# apr +apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes} + +# cvs +cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes} diff --git a/common/environment/configure/gnu-configure-args.sh b/common/environment/configure/gnu-configure-args.sh index 741453bc9e6..4ec0f0ba7c4 100644 --- a/common/environment/configure/gnu-configure-args.sh +++ b/common/environment/configure/gnu-configure-args.sh @@ -87,6 +87,20 @@ case "$XBPS_TARGET_MACHINE" in . ${_AUTOCONFCACHEDIR}/x86_64-linux ;; + ppc64le*) + . ${_AUTOCONFCACHEDIR}/endian-little + . ${_AUTOCONFCACHEDIR}/powerpc-common + . ${_AUTOCONFCACHEDIR}/powerpc-linux + . ${_AUTOCONFCACHEDIR}/powerpc64-linux + ;; + + ppc64*) + . ${_AUTOCONFCACHEDIR}/endian-big + . ${_AUTOCONFCACHEDIR}/powerpc-common + . ${_AUTOCONFCACHEDIR}/powerpc-linux + . ${_AUTOCONFCACHEDIR}/powerpc64-linux + ;; + *) ;; esac