]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
siteconfig: Drop siteconfig class/code/support
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 May 2024 16:15:14 +0000 (17:15 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 31 May 2024 15:58:32 +0000 (16:58 +0100)
The siteconfig code was only used for 5 cache values. The complexity added to sstate
to support this code was considerable and the runtime much more significant than
any benefit the cache files would have added. Drop the support for this which
was only used minimally for ncurses and zlib.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/autotools.bbclass
meta/classes-recipe/siteinfo.bbclass
meta/classes-recipe/toolchain-scripts.bbclass
meta/classes/siteconfig.bbclass [deleted file]
meta/recipes-core/ncurses/ncurses.inc
meta/recipes-core/ncurses/site_config/headers [deleted file]
meta/recipes-core/zlib/site_config/headers [deleted file]
scripts/gen-site-config [deleted file]

index 9359c9b4e19b87bca43e7c6ec76f3c40ee02965b..7ee1b0d9c7487f81c04ab230a634aefe27a39319 100644 (file)
@@ -254,8 +254,6 @@ autotools_do_install() {
        fi
 }
 
-inherit siteconfig
-
 EXPORT_FUNCTIONS do_configure do_compile do_install
 
 B = "${WORKDIR}/build"
index 68aefb8eda6130fa23f3a656be733dedfd13ef3f..25b53d929a78fa0658b88d8cfc58d43697ef6cf4 100644 (file)
@@ -221,20 +221,6 @@ def siteinfo_get_files(d, sysrootcache=False):
         # This would show up as breaking sstatetests.SStateTests.test_sstate_32_64_same_hash for example
         searched = []
 
-    if not sysrootcache:
-        return sitefiles, searched
-
-    # Now check for siteconfig cache files in sysroots
-    path_siteconfig = d.getVar('SITECONFIG_SYSROOTCACHE')
-    if path_siteconfig and os.path.isdir(path_siteconfig):
-        for i in os.listdir(path_siteconfig):
-            if not i.endswith("_config"):
-                continue
-            filename = os.path.join(path_siteconfig, i)
-            sitefiles.append(filename)
     return sitefiles, searched
 
-#
-# Make some information available via variables
-#
-SITECONFIG_SYSROOTCACHE = "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d"
+
index cbef412e79613053d00b314551afa45e763da279..b59a295abcc9a2fdc7deb469b254ee5ba07e3bf8 100644 (file)
@@ -201,7 +201,6 @@ EOF
 
 #we get the cached site config in the runtime
 TOOLCHAIN_CONFIGSITE_NOCACHE = "${@' '.join(siteinfo_get_files(d)[0])}"
-TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
 TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "virtual/${MLPREFIX}libc ncurses"
 DEPENDS += "${TOOLCHAIN_NEED_CONFIGSITE_CACHE}"
 
@@ -223,14 +222,8 @@ toolchain_create_sdk_siteconfig () {
                        sitefile=`echo $sitefile | tr / _`
                        sitefile=`cat ${STAGING_DIR_TARGET}/sysroot-providers/$sitefile`
                esac
-
-               if [ -r ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config ]; then
-                       cat ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config >> $siteconfig
-               fi
        done
 }
-# The immediate expansion above can result in unwanted path dependencies here
-toolchain_create_sdk_siteconfig[vardepsexclude] = "TOOLCHAIN_CONFIGSITE_SYSROOTCACHE"
 
 python __anonymous () {
     import oe.classextend
diff --git a/meta/classes/siteconfig.bbclass b/meta/classes/siteconfig.bbclass
deleted file mode 100644 (file)
index 953cafd..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright OpenEmbedded Contributors
-#
-# SPDX-License-Identifier: MIT
-#
-
-python siteconfig_do_siteconfig () {
-    shared_state = sstate_state_fromvars(d)
-    if shared_state['task'] != 'populate_sysroot':
-        return
-    if not os.path.isdir(os.path.join(d.getVar('FILE_DIRNAME'), 'site_config')):
-        bb.debug(1, "No site_config directory, skipping do_siteconfig")
-        return
-    sstate_install(shared_state, d)
-    bb.build.exec_func('do_siteconfig_gencache', d)
-    sstate_clean(shared_state, d)
-}
-
-EXTRASITECONFIG ?= ""
-
-siteconfig_do_siteconfig_gencache () {
-       mkdir -p ${WORKDIR}/site_config_${MACHINE}
-       gen-site-config ${FILE_DIRNAME}/site_config \
-               >${WORKDIR}/site_config_${MACHINE}/configure.ac
-       cd ${WORKDIR}/site_config_${MACHINE}
-       autoconf
-       rm -f ${BPN}_cache
-       CONFIG_SITE="" ${EXTRASITECONFIG} ./configure ${CONFIGUREOPTS} --cache-file ${BPN}_cache
-       sed -n -e "/ac_cv_c_bigendian/p" -e "/ac_cv_sizeof_/p" \
-               -e "/ac_cv_type_/p" -e "/ac_cv_header_/p" -e "/ac_cv_func_/p" \
-               < ${BPN}_cache > ${BPN}_config
-       mkdir -p ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
-       cp ${BPN}_config ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
-
-}
-
-do_populate_sysroot[sstate-interceptfuncs] += "do_siteconfig "
-
-EXPORT_FUNCTIONS do_siteconfig do_siteconfig_gencache
index 2a3fd4f2c5dd509b81eba5af3b581a7234784026..f5e37b94da66c0a29db0ef91d6c0d41f2aa71403 100644 (file)
@@ -20,8 +20,6 @@ EXTRA_AUTORECONF = "-I m4"
 CACHED_CONFIGUREVARS = "cf_cv_func_nanosleep=yes"
 CACHED_CONFIGUREVARS:append:linux = " cf_cv_working_poll=yes"
 
-EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'"
-
 # Whether to enable separate widec libraries; must be 'true' or 'false'
 #
 # TODO: remove this variable when widec is supported in every setup?
diff --git a/meta/recipes-core/ncurses/site_config/headers b/meta/recipes-core/ncurses/site_config/headers
deleted file mode 100644 (file)
index 087b7bf..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-curses.h
-ncurses/curses.h
-ncurses.h
-ncurses/termcap.h
-
diff --git a/meta/recipes-core/zlib/site_config/headers b/meta/recipes-core/zlib/site_config/headers
deleted file mode 100644 (file)
index 5026891..0000000
+++ /dev/null
@@ -1 +0,0 @@
-zlib.h
diff --git a/scripts/gen-site-config b/scripts/gen-site-config
deleted file mode 100755 (executable)
index 727b809..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/sh
-#  Copyright (c) 2005-2008 Wind River Systems, Inc.
-#
-# SPDX-License-Identifier: GPL-2.0-only
-#
-
-cat << EOF
-AC_PREREQ(2.57)
-AC_INIT([site_wide],[1.0.0])
-
-EOF
-
-# Disable as endian is set in the default config
-#echo AC_C_BIGENDIAN
-#echo
-
-if [ -e $1/types ] ; then
-  while read type ; do
-    echo "AC_CHECK_SIZEOF([$type])"
-  done < $1/types
-
-  echo
-fi
-
-if [ -e $1/funcs ]; then
-  while read func ; do
-    echo "AC_CHECK_FUNCS([$func])"
-  done < $1/funcs
-
-  echo
-fi
-
-if [ -e $1/headers ]; then
-  while read header ; do
-    echo "AC_CHECK_HEADERS([$header])"
-  done < $1/headers
-
-  echo
-fi
-
-cat << EOF
-AC_OUTPUT
-EOF