patacongo commented on a change in pull request #131: Improve config
URL: https://github.com/apache/incubator-nuttx/pull/131#discussion_r370448873
 
 

 ##########
 File path: tools/testbuild.sh
 ##########
 @@ -163,83 +138,19 @@ function distclean {
 function configure {
   cd $nuttx/tools || { echo "ERROR: failed to CD to $nuttx/tools"; exit 1; }
   echo "  Configuring..."
-  ./configure.sh $config
-
-  cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; }
-
-  if [ "X$host" == "Xlinux" ]; then
-    echo "  Select CONFIG_HOST_LINUX=y"
-
-    kconfig-tweak --file $nuttx/.config --enable CONFIG_HOST_LINUX
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_WINDOWS
-
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_TOOLCHAIN_WINDOWS
-
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_CYGWIN
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_MSYS
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_OTHER
-
-    kconfig-tweak --file $nuttx/.config --enable CONFIG_SIM_X8664_SYSTEMV
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_SIM_X8664_MICROSOFT
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_SIM_M32
-  else
-    echo "  Select CONFIG_HOST_WINDOWS=y"
-    kconfig-tweak --file $nuttx/.config --enable CONFIG_HOST_WINDOWS
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_LINUX
-
-    if [ "X$wenv" == "Xcygwin" ]; then
-      echo "  Select CONFIG_WINDOWS_CYGWIN=y"
-      kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_CYGWIN
-      kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU
-      kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE
-    else
-      kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_CYGWIN
-      if [ "X$wenv" == "Xubuntu" ]; then
-        echo "  Select CONFIG_WINDOWS_UBUNTU=y"
-        kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_UBUNTU
-        kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE
-      else
-        echo "  Select CONFIG_WINDOWS_NATIVE=y"
-        kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU
-        kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_NATIVE
-      fi
-    fi
-
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_MSYS
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_OTHER
-
-    kconfig-tweak --file $nuttx/.config --enable CONFIG_SIM_X8664_MICROSOFT
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_SIM_X8664_SYSTEMV
-    kconfig-tweak --file $nuttx/.config --disable CONFIG_SIM_M32
-  fi
-
-  kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_MACOS
-  kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_OTHER
-
-  if [ "X$sizet" == "Xlong" ]; then
 
 Review comment:
   Yes, I think you do not understand how the new and delete operators are 
provided:  Here are the possibilities:
   
   - The operators could be provided by libs/libxx.  In this case, 
CONFIG_CXX_NEWLONG determines the argument.
   - The operators could be provided by uClibc++ or libc++.  In that case 
size_t is determined by the architecture specific definitions.  In 
include/sys/types.h it is set to the type of uinptr_t which varies with 
architecture
   - The operators could be provided by the C++ library binaries built into the 
toolchain.  These probably come from newlib.  The type of size_t is completely 
unknown in this case.
   
   I assure you from years of experience with this, you CANNOT use any constant 
setting.  It must be variable to match all possible cases with all possible 
tools in the build test.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to