This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Friday 09 October 2009 14:01:47 Arnaud Vrac wrote: > Alright, I reworked the patch to do exactly that, and also actually made > it work... > # HG changeset patch > # User Arnaud Vrac <avrac@freebox.fr> > # Date 1255089469 -7200 > # Node ID 9c7d49b78b50b8e633b9500dcd2d7bf2df0e3006 > # Parent 8d386988dcb19ac9ab1facd450da319b03ffd02d > eglibc: add support for user provided option groups > > Signed-off-by: Arnaud Vrac <avrac@freebox.fr> > [--SNIP--] > diff -r 8d386988dcb1 -r 9c7d49b78b50 scripts/build/libc/eglibc.sh > --- a/scripts/build/libc/eglibc.sh Sun Oct 04 12:53:12 2009 +0200 > +++ b/scripts/build/libc/eglibc.sh Fri Oct 09 13:57:49 2009 +0200 > @@ -122,9 +122,52 @@ > return 0 > } > > -# There is nothing to do for eglibc check config > +# Copy user provided eglibc configuration file if provided > do_libc_check_config() { > - : > + if [ "${CT_EGLIBC_CUSTOM_CONFIG}" != "y" ]; then > + return 0 > + fi > + > + CT_DoStep INFO "Checking C library configuration" > + > + CT_TestOrAbort "You did not provide an eglibc config file!" \ > + -n "${CT_EGLIBC_OPTION_GROUPS_FILE}" -a \ > + -f "${CT_EGLIBC_OPTION_GROUPS_FILE}" > + > + CT_DoExecLog ALL cp "${CT_EGLIBC_OPTION_GROUPS_FILE}" "${CT_CONFIG_DIR}/eglibc.config" > + > + # NSS configuration > + if grep -E '^OPTION_EGLIBC_NSSWITCH[\t ]*=[\t ]*n' "${CT_EGLIBC_OPTION_GROUPS_FILE}" >/dev/null 2>&1; then Use [[:space:]] instead of [\t ] CT_DoLog DEBUG "Using fixed-configuration nsswitch facility" (as opposed to "full-blown", in the else part, below). > + nss_config="${CT_CONFIG_DIR}/nsswitch.config" > + nss_functions="${CT_CONFIG_DIR}/nsswitch.functions" These two assignements are overriden in the following lines. > + if [ "${CT_EGLIBC_BUNDLED_NSS_CONFIG}" = "y" ]; then > + nss_config="${CT_SRC_DIR}/eglibc-${CT_LIBC_VERSION}/nss/fixed-nsswitch.conf > + else > + nss_config="${CT_EGLIBC_NSS_CONFIG}" > + fi > + > + if [ "${CT_EGLIBC_BUNDLED_NSS_FUNCTIONS}" = "y" ]; then > + nss_functions="${CT_SRC_DIR}/eglibc-${CT_LIBC_VERSION}/nss/fixed-nsswitch.functions" > + else > + nss_functions="${CT_EGLIBC_NSS_FUNCTIONS}" > + fi > + > + CT_TestOrAbort "NSS config file not found!" -n "${nss_config}" -a -f "${nss_config}" > + CT_DoExecLog ALL cp "${nss_config}" "${CT_CONFIG_DIR}/nsswitch.config" Move the check up a few lines, so it is next to the nss_config assignement (no need for a new line between the assignement and the check). > + CT_TestOrAbort "NSS functions file not found!" -n "${nss_functions}" -a -f "${nss_functions}" > + CT_DoExecLog ALL cp "${nss_functions}" "${CT_CONFIG_DIR}/nsswitch.functions" > + > + echo "OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG => ${CT_CONFIG_DIR}/nsswitch.config" \ > + >> "${CT_CONFIG_DIR}/eglibc.config" > + echo "OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${CT_CONFIG_DIR}/nsswitch.functions" \ > + >> "${CT_CONFIG_DIR}/eglibc.config" > + else > + CT_DoLog DEBUG "Not using nsswitch fixed configuration" "Using full-blown nsswitch facility" ? > + fi > + > + CT_EndStep > } > > # This function installs the eglibc headers needed to build the core > compiler @@ -143,6 +186,10 @@ > > CT_DoLog EXTRA "Configuring C library" > > + if [ "${CT_EGLIBC_CUSTOM_CONFIG}" = "y" ]; then > + CT_DoExecLog ALL cp "${CT_CONFIG_DIR}/eglibc.config" option-groups.config > + fi > + > cross_cc=$(CT_Which "${CT_TARGET}-gcc") > cross_cxx=$(CT_Which "${CT_TARGET}-g++") > cross_ar=$(CT_Which "${CT_TARGET}-ar") > @@ -210,6 +257,10 @@ > > CT_DoLog EXTRA "Configuring C library" > > + if [ "${CT_EGLIBC_CUSTOM_CONFIG}" = "y" ]; then > + CT_DoExecLog ALL cp "${CT_CONFIG_DIR}/eglibc.config" option-groups.config > + fi > + > # Add some default glibc config options if not given by user. > # We don't need to be conditional on wether the user did set different > # values, as they CT_LIBC_GLIBC_EXTRA_CONFIG is passed after extra_config -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | `------------------------------^-------^------------------^--------------------' -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |