The goal of this change is to fix FDPIC toolchain compilation. Previous implementation had the issue that `make oldconfig` destroyed the effect of `echo` and `sed` executing to write BINFMT-related lines into .config. Note that we have to use `echo UCLIBC_FORMAT_*=y` instead of sed because in the original file `UCLIBC_FORMAT_*` line may not exist. Sed just replaces text in lines, so if the line doesn't exist sed will do nothing. To have the proper `UCLIBC_FORMAT_*=y` in the .config I've changed some `sed`s to `echo`s. Without this change the compilation of FDPIC toolchain fails because UCLIBC_FORMAT_FDPIC_ELF is not defined, it leads to miss of `-mfdpic` compilation flag and to the absense of crtreloc.o object that needs during utilities linking and the linking process fails.
Signed-off-by: Dmitry Chestnykh dm.chestnykh@gmail.com --- toolchain/uclibc-ng/Makefile | 71 ++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 36 deletions(-)
diff --git a/toolchain/uclibc-ng/Makefile b/toolchain/uclibc-ng/Makefile index 6b1fd31ce..cabac310d 100644 --- a/toolchain/uclibc-ng/Makefile +++ b/toolchain/uclibc-ng/Makefile @@ -85,42 +85,6 @@ ifeq ($(ADK_TARGET_HARD_FLOAT_DP),y) $(SED) 's/.*(UCLIBC_HAS_FPU).*/\1=y/' ${WRKBUILD}/.config $(SED) 's/.*(UCLIBC_HAS_SOFT_FLOAT).*/# \1 is not set/' ${WRKBUILD}/.config endif -ifeq ($(ADK_TARGET_BINFMT_ELF),y) - $(SED) 's/.*(UCLIBC_FORMAT_ELF).*/\1=y/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config -endif -ifeq ($(ADK_TARGET_BINFMT_FDPIC),y) - $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/\1=y/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_ELF).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config -endif -ifeq ($(ADK_TARGET_BINFMT_FLAT),y) - echo '# UCLIBC_FORMAT_FLAT is not set' >> ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT).*/\1=y/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config -ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA),y) - echo '# UCLIBC_FORMAT_FLAT_SEP_DATA is not set' >> ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/\1=y/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT ).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config -endif -ifeq ($(ADK_TARGET_BINFMT_FLAT_SHARED),y) - echo '# UCLIBC_FORMAT_SHARED_FLAT is not set' >> ${WRKBUILD}/.config - echo '# HAVE_NO_SHARED is not set' >> ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/\1=y/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT ).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config -endif -endif ifeq ($(ADK_TARGET_LIBC_WITH_LIBICONV),y) $(SED) 's/.*(UCLIBC_HAS_LIBICONV).*/\1=y/' ${WRKBUILD}/.config endif @@ -344,6 +308,41 @@ endif UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ UCLIBC_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ oldconfig + +ifeq ($(ADK_TARGET_BINFMT_ELF),y) + echo 'UCLIBC_FORMAT_ELF=y' >> ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FDPIC),y) + echo 'UCLIBC_FORMAT_FDPIC_ELF=y' >> ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_ELF).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FLAT),y) + echo 'UCLIBC_FORMAT_FLAT=y' >> ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config +ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA),y) + echo 'UCLIBC_FORMAT_FLAT_SEP_DATA=y' >> ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT ).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FLAT_SHARED),y) + echo '# HAVE_NO_SHARED is not set' >> ${WRKBUILD}/.config + echo 'UCLIBC_FORMAT_SHARED_FLAT=y' >> ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT ).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config +endif +endif + ifeq ($(ADK_TARGET_LIBC_WITH_LOCALE),y) $(SED) 's/.*(UCLIBC_BUILD_MINIMAL_LOCALES).*/\1="$(ADK_RUNTIME_DEFAULT_LOCALE)"/' ${WRKBUILD}/.config endif
My OpenADK config
вс, 11 февр. 2024 г. в 09:34, Dmitry Chestnykh dm.chestnykh@gmail.com:
The goal of this change is to fix FDPIC toolchain compilation. Previous implementation had the issue that `make oldconfig` destroyed the effect of `echo` and `sed` executing to write BINFMT-related lines into .config. Note that we have to use `echo UCLIBC_FORMAT_*=y` instead of sed because in the original file `UCLIBC_FORMAT_*` line may not exist. Sed just replaces text in lines, so if the line doesn't exist sed will do nothing. To have the proper `UCLIBC_FORMAT_*=y` in the .config I've changed some `sed`s to `echo`s. Without this change the compilation of FDPIC toolchain fails because UCLIBC_FORMAT_FDPIC_ELF is not defined, it leads to miss of `-mfdpic` compilation flag and to the absense of crtreloc.o object that needs during utilities linking and the linking process fails.
Signed-off-by: Dmitry Chestnykh dm.chestnykh@gmail.com
toolchain/uclibc-ng/Makefile | 71 ++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 36 deletions(-)
diff --git a/toolchain/uclibc-ng/Makefile b/toolchain/uclibc-ng/Makefile index 6b1fd31ce..cabac310d 100644 --- a/toolchain/uclibc-ng/Makefile +++ b/toolchain/uclibc-ng/Makefile @@ -85,42 +85,6 @@ ifeq ($(ADK_TARGET_HARD_FLOAT_DP),y) $(SED) 's/.*(UCLIBC_HAS_FPU).*/\1=y/' ${WRKBUILD}/.config $(SED) 's/.*(UCLIBC_HAS_SOFT_FLOAT).*/# \1 is not set/' ${WRKBUILD}/.config endif -ifeq ($(ADK_TARGET_BINFMT_ELF),y)
$(SED) 's/.*\(UCLIBC_FORMAT_ELF\).*/\1=y/' ${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config -endif -ifeq ($(ADK_TARGET_BINFMT_FDPIC),y)
$(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/\1=y/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_ELF\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config -endif -ifeq ($(ADK_TARGET_BINFMT_FLAT),y)
echo '# UCLIBC_FORMAT_FLAT is not set' >> ${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/\1=y/' ${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/'
${WRKBUILD}/.config -ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA),y)
echo '# UCLIBC_FORMAT_FLAT_SEP_DATA is not set' >>
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/\1=y/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT \).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/'
${WRKBUILD}/.config -endif -ifeq ($(ADK_TARGET_BINFMT_FLAT_SHARED),y)
echo '# UCLIBC_FORMAT_SHARED_FLAT is not set' >>
${WRKBUILD}/.config
echo '# HAVE_NO_SHARED is not set' >> ${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/\1=y/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT \).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/'
${WRKBUILD}/.config -endif -endif ifeq ($(ADK_TARGET_LIBC_WITH_LIBICONV),y) $(SED) 's/.*(UCLIBC_HAS_LIBICONV).*/\1=y/' ${WRKBUILD}/.config endif @@ -344,6 +308,41 @@ endif UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ UCLIBC_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ oldconfig
+ifeq ($(ADK_TARGET_BINFMT_ELF),y)
echo 'UCLIBC_FORMAT_ELF=y' >> ${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FDPIC),y)
echo 'UCLIBC_FORMAT_FDPIC_ELF=y' >> ${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_ELF\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FLAT),y)
echo 'UCLIBC_FORMAT_FLAT=y' >> ${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/'
${WRKBUILD}/.config +ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA),y)
echo 'UCLIBC_FORMAT_FLAT_SEP_DATA=y' >> ${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT \).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/'
${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FLAT_SHARED),y)
echo '# HAVE_NO_SHARED is not set' >> ${WRKBUILD}/.config
echo 'UCLIBC_FORMAT_SHARED_FLAT=y' >> ${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT \).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/'
${WRKBUILD}/.config
$(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/'
${WRKBUILD}/.config +endif +endif
ifeq ($(ADK_TARGET_LIBC_WITH_LOCALE),y) $(SED) 's/.*(UCLIBC_BUILD_MINIMAL_LOCALES).*/\1="$(ADK_RUNTIME_DEFAULT_LOCALE)"/' ${WRKBUILD}/.config endif -- 2.43.0
The goal of this change is to fix FDPIC toolchain compilation. Previous implementation had the issue that `make oldconfig` destroyed the effect of `echo` and `sed` executing to write BINFMT-related lines into .config. Note that we have to use `echo UCLIBC_FORMAT_*=y` instead of sed because in the original file `UCLIBC_FORMAT_*` line may not exist. Sed just replaces text in lines, so if the line doesn't exist sed will do nothing. To have the proper `UCLIBC_FORMAT_*=y` in the .config I've changed some `sed`s to `echo`s. Without this change the compilation of FDPIC toolchain fails because UCLIBC_FORMAT_FDPIC_ELF is not defined, it leads to miss of `-mfdpic` compilation flag and to the absense of crtreloc.o object that needs during utilities linking and the linking process fails.
Signed-off-by: Dmitry Chestnykh dm.chestnykh@gmail.com --- toolchain/uclibc-ng/Makefile | 76 +++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 36 deletions(-)
diff --git a/toolchain/uclibc-ng/Makefile b/toolchain/uclibc-ng/Makefile index 6b1fd31ce..a43d2050e 100644 --- a/toolchain/uclibc-ng/Makefile +++ b/toolchain/uclibc-ng/Makefile @@ -85,42 +85,6 @@ ifeq ($(ADK_TARGET_HARD_FLOAT_DP),y) $(SED) 's/.*(UCLIBC_HAS_FPU).*/\1=y/' ${WRKBUILD}/.config $(SED) 's/.*(UCLIBC_HAS_SOFT_FLOAT).*/# \1 is not set/' ${WRKBUILD}/.config endif -ifeq ($(ADK_TARGET_BINFMT_ELF),y) - $(SED) 's/.*(UCLIBC_FORMAT_ELF).*/\1=y/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config -endif -ifeq ($(ADK_TARGET_BINFMT_FDPIC),y) - $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/\1=y/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_ELF).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config -endif -ifeq ($(ADK_TARGET_BINFMT_FLAT),y) - echo '# UCLIBC_FORMAT_FLAT is not set' >> ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT).*/\1=y/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config -ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA),y) - echo '# UCLIBC_FORMAT_FLAT_SEP_DATA is not set' >> ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/\1=y/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT ).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config -endif -ifeq ($(ADK_TARGET_BINFMT_FLAT_SHARED),y) - echo '# UCLIBC_FORMAT_SHARED_FLAT is not set' >> ${WRKBUILD}/.config - echo '# HAVE_NO_SHARED is not set' >> ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/\1=y/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT ).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config - $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config -endif -endif ifeq ($(ADK_TARGET_LIBC_WITH_LIBICONV),y) $(SED) 's/.*(UCLIBC_HAS_LIBICONV).*/\1=y/' ${WRKBUILD}/.config endif @@ -344,6 +308,46 @@ endif UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ UCLIBC_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ oldconfig + +ifeq ($(ADK_TARGET_BINFMT_ELF),y) + $(SED) 's/.*UCLIBC_FORMAT_ELF.*//' ${WRKBUILD}/.config + echo 'UCLIBC_FORMAT_ELF=y' >> ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT)=.*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FDPIC),y) + $(SED) 's/.*UCLIBC_FORMAT_FDPIC_ELF.*//' ${WRKBUILD}/.config + echo 'UCLIBC_FORMAT_FDPIC_ELF=y' >> ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_ELF).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT)=.*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FLAT),y) + $(SED) 's/.*UCLIBC_FORMAT_FLAT=.*//' ${WRKBUILD}/.config + echo 'UCLIBC_FORMAT_FLAT=y' >> ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config +ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA),y) + $(SED) 's/.*UCLIBC_FORMAT_FLAT_SEP_DATA.*//' ${WRKBUILD}/.config + echo 'UCLIBC_FORMAT_FLAT_SEP_DATA=y' >> ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT)=.*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_SHARED_FLAT).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config +endif +ifeq ($(ADK_TARGET_BINFMT_FLAT_SHARED),y) + echo '# HAVE_NO_SHARED is not set' >> ${WRKBUILD}/.config + $(SED) 's/.*UCLIBC_FORMAT_SHARED_FLAT.*//' ${WRKBUILD}/.config + echo 'UCLIBC_FORMAT_SHARED_FLAT=y' >> ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT )=.*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FLAT_SEP_DATA).*/# \1 is not set/' ${WRKBUILD}/.config + $(SED) 's/.*(UCLIBC_FORMAT_FDPIC_ELF).*/# \1 is not set/' ${WRKBUILD}/.config +endif +endif + ifeq ($(ADK_TARGET_LIBC_WITH_LOCALE),y) $(SED) 's/.*(UCLIBC_BUILD_MINIMAL_LOCALES).*/\1="$(ADK_RUNTIME_DEFAULT_LOCALE)"/' ${WRKBUILD}/.config endif
Allowing selection both FDPIC as binary format for target and MMU can lead to some inconsistent configurations and therefore build errors.
Signed-off-by: Dmitry Chestnykh dm.chestnykh@gmail.com --- Previously I have reported about compilation error and made the patch. But it was wrong as I forgot to disable MMU before selecting FDPIC as binfmt. This patch disallows simultaneous selection of MMU and FDPIC as binary format.
target/config/Config.in.binfmt | 1 + 1 file changed, 1 insertion(+)
diff --git a/target/config/Config.in.binfmt b/target/config/Config.in.binfmt index 4106979fa..70e0cc585 100644 --- a/target/config/Config.in.binfmt +++ b/target/config/Config.in.binfmt @@ -25,6 +25,7 @@ config ADK_TARGET_BINFMT_FDPIC bool "FDPIC" select BUSYBOX_NOMMU depends on ADK_TARGET_ARCH_ARM || ADK_TARGET_ARCH_BFIN || ADK_TARGET_ARCH_FRV || ADK_TARGET_ARCH_SH + depends on !ADK_TARGET_WITH_MMU
config ADK_TARGET_BINFMT_DSBT bool "DSBT"
Hi Dmitry,
thanks, applied and pushed.
best regards Waldemar
Dmitry Chestnykh wrote,
Allowing selection both FDPIC as binary format for target and MMU can lead to some inconsistent configurations and therefore build errors.
Signed-off-by: Dmitry Chestnykh dm.chestnykh@gmail.com
Previously I have reported about compilation error and made the patch. But it was wrong as I forgot to disable MMU before selecting FDPIC as binfmt. This patch disallows simultaneous selection of MMU and FDPIC as binary format.
target/config/Config.in.binfmt | 1 + 1 file changed, 1 insertion(+)
diff --git a/target/config/Config.in.binfmt b/target/config/Config.in.binfmt index 4106979fa..70e0cc585 100644 --- a/target/config/Config.in.binfmt +++ b/target/config/Config.in.binfmt @@ -25,6 +25,7 @@ config ADK_TARGET_BINFMT_FDPIC bool "FDPIC" select BUSYBOX_NOMMU depends on ADK_TARGET_ARCH_ARM || ADK_TARGET_ARCH_BFIN || ADK_TARGET_ARCH_FRV || ADK_TARGET_ARCH_SH
- depends on !ADK_TARGET_WITH_MMU
config ADK_TARGET_BINFMT_DSBT bool "DSBT" -- 2.43.1
dev mailing list -- dev@openadk.org To unsubscribe send an email to dev-leave@openadk.org