public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Split patch for Mac OS/ was Re: Help with Building toolchain with  crosstool-ng on Mac OS X 10.6.2  (Snow Leopard)
@ 2010-02-02 23:24 tvb377
  2010-02-03 23:17 ` Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: tvb377 @ 2010-02-02 23:24 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

[-- Attachment #1: Type: text/plain, Size: 3403 bytes --]

Hi Yann, all,
> Also, if you would provide mercurial patches, it would be easier to work
> with. See docs/overview.txt, section "Contributing".
Sorry, I'm quite new to mercurial. And I guess the last step in
"Contributing" means it wants to send emails, which I cannot provide 
on this machine here in reasonable time.
Next time I'll use it, promised ;-)

> One patch per new tool, please. Also, be sure to see how it plays with
> the companion tools that were recently added.
OK. Except the expanded list of gnu tools added in configure+Makefile.in,
because all added tools get to use the same mechanism already
employed that makes sure that they actually get called.
--> if it works for sed, it also works for objdump.

> > - make all calls to stat(1) dependent to `uname -s` or replace the call.
> One patch for that.
OK.

> > - replace all calls to readlink(1GNU) with compatible variants.
> "readlink -e" and "readlink" are not equivalent.
No, but
a) ct-ng does not use libs it searches for (here only ncurses) by itself.
b) The variable where is dropped for libs, afaik. It is also
   questionnable if you would actually need the shared object instead of
   the link.
c) I'm not aware of installations where links point to links 
   [that point to links...] that point to shared objects.
   Then the check could in theory fail when removing the -e

> > - uname -o is not portable. use -s when -o fails
> Ditto.
OK

> > - a bug in the sed-expression that sets the nanoseconds to 0 for a
> >   date(1) not handling %N
> So this change seems to imply that on MacOS-X or *BSD, we get:
>   > date +%N
>   N
> Right?
Right.

> And I have the tools for x86_64-linux-gnu-{gcc,ld,...}, but not the ones
> for
> x86_64-unknown-linux-gnu-{gcc,ld,...}. So it is much more reliable to ask
> gcc than to ask config.guess.
> 
> gcc -dumpmachine will tell us the tuple for which it was configured, and
> that means the prefix to use to the actual tools, which is what we need.
Hmm, I see the point. But apparently then there is an inconsistency here
on Darwin, be it in the gcc configuration or the configure (I think it
was of gmp) that failed.
Anyway, my change only is for Darwin + BSD.

> > - the compiler command line options for compiling wrapper.c crashes gcc
> >   on MacOS (and IMHO were a little bit overdone for the complexity of
> >   wrapper.c).
> Separate patch for that.
OK.

> Statically linking should hopefully speed up things. Having a /slow/
> wrapper is not very interesting, is it? Of course, the ratio
> time-in-wrapper / (time-in-wrapper + time-in-actual-tool) should be
> fairly small, except for very trivial programs, where the total time
> will anyway be almost imperceptible...
imho, statically linking will not buy you a measurable amount of time,
especially not when linking only to such mundane things like libc that
are guaranteed to be in core, anyway.

> > - under Darwin, use DYLD_LIBRARY_PATH in wrapper.c
> Separate patch for that as well.
OK. Please note that this patch requires the above cmd line patch.

> > - added printenv to the build.log (I found that helpful).
> Separate patch.
OK.

Hope it fits now for you. Please note that
- all patches (except for build-mpfr and using config.guess)
  are necessary to run crosstool-ng itself.
- all are tested except the one in populate.in

Sorry for the inconvenience that these are not mercurial-sent patches.

Regards
Titus

[-- Attachment #2: build-mpfr-on-darwin.patch --]
[-- Type: application/octet-stream, Size: 485 bytes --]

diff -r 160fc94ed49f scripts/build/companion_libs/mpfr.sh
--- a/scripts/build/companion_libs/mpfr.sh	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/build/companion_libs/mpfr.sh	Tue Feb 02 23:11:25 2010 +0100
@@ -75,6 +75,7 @@
     case "${CT_HOST}" in
         *cygwin*)   mpfr_opt="--disable-thread-safe";;
         *mingw*)    mpfr_opt="--disable-thread-safe";;
+        *darwin*)   mpfr_opt="--disable-thread-safe";;
         *)          mpfr_opt="--enable-thread-safe";;
     esac
 

[-- Attachment #3: corrected-date-sed-expr.patch --]
[-- Type: application/octet-stream, Size: 355 bytes --]

diff -r 160fc94ed49f scripts/functions
--- a/scripts/functions	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/functions	Tue Feb 02 23:11:25 2010 +0100
@@ -192,7 +192,7 @@
 # to the highest entire second
 # Usage: CT_DoDate <fmt>
 CT_DoDate() {
-    date "$1" |sed -r -e 's/%N$/000000000/;'
+    date "$1" |sed -r -e 's/N$/000000000/;'
 }
 
 CT_STEP_COUNT=1

[-- Attachment #4: dyld-library-path-wrapper.c.patch --]
[-- Type: application/octet-stream, Size: 966 bytes --]

diff -r 160fc94ed49f scripts/wrapper.c
--- a/scripts/wrapper.c	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/wrapper.c	Tue Feb 02 23:11:25 2010 +0100
@@ -7,6 +7,11 @@
 #include <unistd.h>
 #include <errno.h>
 
+#ifdef	Darwin
+static const char * ldlp = "DYLD_LIBRARY_PATH";
+#else
+static const char * ldlp = "LD_LIBRARY_PATH";
+#endif
 
 /* Needed for execve */
 extern char **environ;
@@ -106,7 +111,7 @@
 
   /* Now add the directory with our runtime libraries to the
      front of the library search path, LD_LIBRARY_PATH */
-  ldlibpath = getenv( "LD_LIBRARY_PATH" );
+  ldlibpath = getenv(ldlp);
   if( ldlibpath ) {
     basedir = (char*) realloc( basedir,   strlen( basedir )
                                         + strlen( ldlibpath )
@@ -115,7 +120,7 @@
     strcat( basedir, ldlibpath );
   }
 
-  if( setenv( "LD_LIBRARY_PATH", basedir, 1 ) ) {
+  if( setenv( ldlp, basedir, 1 ) ) {
     errno = ENOMEM;
     perror( "tool wrapper" );
     exit( 1 );

[-- Attachment #5: gnu-tools.patch --]
[-- Type: application/octet-stream, Size: 2474 bytes --]

diff -r 160fc94ed49f Makefile.in
--- a/Makefile.in	Sun Jan 31 23:04:35 2010 +0100
+++ b/Makefile.in	Tue Feb 02 23:11:25 2010 +0100
@@ -52,6 +52,11 @@
 grep   := @@grep@@
 make   := @@make@@
 sed    := @@sed@@
+libtool:= @@libtool@@
+objcopy:= @@objcopy@@
+objdump:= @@objdump@@
+readelf:= @@readelf@@
+patch  := @@patch@@
 
 ###############################################################################
 # Sanity checks
@@ -139,6 +144,11 @@
 	  echo "export grep=$(grep)";       \
 	  echo "export make=$(make)";       \
 	  echo "export sed=$(sed)";         \
+	  echo "export libtool=$(libtool)"; \
+	  echo "export objcopy=$(objcopy)"; \
+	  echo "export objdump=$(objdump)"; \
+	  echo "export readelf=$(readelf)"; \
+	  echo "export patch=$(patch)";     \
 	 ) >paths.mk
 
 #--------------------------------------
diff -r 160fc94ed49f configure
--- a/configure	Sun Jan 31 23:04:35 2010 +0100
+++ b/configure	Tue Feb 02 23:11:25 2010 +0100
@@ -346,17 +346,17 @@
              ver='^GNU Make (3.[89][[:digit:]]|[4-9])'  \
              err="GNU 'make' 3.80 or above was not found"
 has_or_abort prog=gcc
-has_or_abort prog="awk gawk" ver='^GNU Awk' err="GNU 'awk' was not found"
+has_or_abort prog="gawk awk" ver='^GNU Awk' err="GNU 'awk' was not found"
 has_or_abort prog=bison
 has_or_abort prog=flex
 has_or_abort prog=makeinfo
 has_or_abort prog=automake                                                      \
              ver='\(GNU automake\) (1\.[[:digit:]]{2,}|[2-9][[:digit:]]*\.)'    \
              err="'automake' 1.10 or above was not found"
-has_or_abort prog=libtool                                                                           \
+has_or_abort prog=libtool var=libtool                                                               \
              ver='\(GNU libtool.*\) (2[[:digit:]]*\.|1\.6[[:digit:]]*\.|1\.5\.[2-9][[:digit:]]+)'   \
              err="'libtool' 1.5.26 or above was not found"
-has_or_abort prog=stat ver='GNU coreutils'
+has_or_abort prog=stat
 has_or_abort prog="aria2c curl wget"
 has_or_abort prog=cvs
 has_or_abort prog=patch
@@ -365,6 +365,10 @@
 has_or_abort prog=bzip2
 has_or_abort prog=lzma
 has_or_abort prog=readlink
+has_or_abort prog=objcopy var=objcopy
+has_or_abort prog=objdump var=objdump
+has_or_abort prog=readelf var=readelf
+has_or_abort prog=patch var=patch
 
 has_or_abort inc="ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h"    \
              err="'ncurses' headers files were not found"

[-- Attachment #6: nice-to-see-all-envvars.patch --]
[-- Type: application/octet-stream, Size: 464 bytes --]

diff -r 160fc94ed49f scripts/crosstool-NG.sh.in
--- a/scripts/crosstool-NG.sh.in	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/crosstool-NG.sh.in	Tue Feb 02 23:11:25 2010 +0100
@@ -483,6 +488,8 @@
     CT_DoLog EXTRA "  host   = ${CT_REAL_HOST}"
     CT_DoLog EXTRA "  target = ${CT_TARGET}"
     set |grep -E '^CT_.+=' |sort |CT_DoLog DEBUG
+    CT_DoLog DEBUG "  Other environment:"
+    printenv |grep -v -E '^CT_.+=' |sort |CT_DoLog DEBUG
     CT_EndStep
 fi
 

[-- Attachment #7: readlink.patch --]
[-- Type: application/octet-stream, Size: 1639 bytes --]

diff -r 160fc94ed49f configure
--- a/configure	Sun Jan 31 23:04:35 2010 +0100
+++ b/configure	Tue Feb 02 23:11:25 2010 +0100
@@ -160,7 +160,7 @@
                 printf "Checking for '${item}'... "
                 where="$( gcc -print-file-name="${item}" )"
                 if [ "${where}" != "${item}" ]; then
-                    where="$( readlink -e "${where}" )"
+                    where="$( readlink "${where}" )"
                     status=yes
                     break;
                 fi
diff -r 160fc94ed49f scripts/wrapper.in
--- a/scripts/wrapper.in	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/wrapper.in	Tue Feb 02 23:11:25 2010 +0100
@@ -1,5 +1,10 @@
 #!/bin/sh
 
+# this wrapper will not work under BSD systems or others
+# not containig the GNU readlink.
+# Under those, wrapper.c will forcibly be used
+# regardless of the config file setting.
+
 canonicalizedname=$(readlink -nm "${0}")
 dirname="$(dirname "${canonicalizedname}")"
 basename="$(basename "${canonicalizedname}")"
diff -r 160fc94ed49f scripts/build/internals.sh
--- a/scripts/build/internals.sh	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/build/internals.sh	Tue Feb 02 23:11:25 2010 +0100
@@ -42,6 +42,11 @@
         CT_DoLog EXTRA "Installing toolchain wrappers"
         CT_Pushd "${CT_PREFIX_DIR}/bin"
 
+        if [ "$CT_SYS_OS" = "Darwin" -o "$CT_SYS_OS" = "FreeBSD" ] ; then
+            # wrapper does not work (when using readlink -m)
+            CT_DoLog EXTRA "Forcing usage of binary wrappers"
+            CT_TOOLS_WRAPPER="exec"
+        fi
         # Install the wrapper
         case "${CT_TOOLS_WRAPPER}" in
             script)

[-- Attachment #8: samples.mk-sed.patch --]
[-- Type: application/octet-stream, Size: 1147 bytes --]

diff -r 160fc94ed49f samples/samples.mk
--- a/samples/samples.mk	Sun Jan 31 23:04:35 2010 +0100
+++ b/samples/samples.mk	Tue Feb 02 23:11:25 2010 +0100
@@ -5,10 +5,10 @@
 CT_TOP_SAMPLES := $(patsubst $(CT_TOP_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_TOP_DIR)/samples/*/crosstool.config))
 CT_LIB_SAMPLES := $(filter-out $(CT_TOP_SAMPLES),$(patsubst $(CT_LIB_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_LIB_DIR)/samples/*/crosstool.config)))
 CT_SAMPLES := $(shell echo $(sort $(CT_TOP_SAMPLES) $(CT_LIB_SAMPLES))  \
-                      |sed -r -e 's/ /\n/g;'                            \
-                      |sed -r -e 's/(.*),(.*)/\2,\1/;'                  \
+                      |$(sed) -r -e 's/ /\n/g;'                            \
+                      |$(sed) -r -e 's/(.*),(.*)/\2,\1/;'                  \
                       |LC_ALL=C sort                                    \
-                      |sed -r -e 's/(.*),(.*)/\2,\1/;'                  \
+                      |$(sed) -r -e 's/(.*),(.*)/\2,\1/;'                  \
                )
 
 # ----------------------------------------------------------

[-- Attachment #9: sed-portable.patch --]
[-- Type: application/octet-stream, Size: 829 bytes --]

diff -r 160fc94ed49f scripts/crosstool-NG.sh.in
--- a/scripts/crosstool-NG.sh.in	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/crosstool-NG.sh.in	Tue Feb 02 23:11:25 2010 +0100
@@ -474,7 +479,7 @@
     CT_DoLog EXTRA "Installing user-supplied crosstool-NG configuration"
     CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin"
     CT_DoExecLog DEBUG install -m 0755 "${CT_LIB_DIR}/scripts/toolchain-config.in" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
-    CT_DoExecLog DEBUG sed -r -i -e 's,@@grep@@,"'"${grep}"'",;' "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
+    CT_DoExecLog DEBUG sed -i -e 's,@@grep@@,"'"${grep}"'",;' "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
     bzip2 -c -9 .config >>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config"
 
     CT_DoStep EXTRA "Dumping internal crosstool-NG configuration"

[-- Attachment #10: uname-portable.patch --]
[-- Type: application/octet-stream, Size: 591 bytes --]

diff -r 160fc94ed49f scripts/crosstool-NG.sh.in
--- a/scripts/crosstool-NG.sh.in	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/crosstool-NG.sh.in	Tue Feb 02 23:11:25 2010 +0100
@@ -189,8 +189,8 @@
 CT_SYS_HOSTNAME="${CT_SYS_HOSTNAME:-$(uname -n)}"
 CT_SYS_KERNEL=$(uname -s)
 CT_SYS_REVISION=$(uname -r)
-# MacOS X lacks '-o' :
-CT_SYS_OS=$(uname -o || echo "Unknown (maybe MacOS-X)")
+# uname -o is a GNU Extension. Others lack '-o' --> use System name for OS name.
+CT_SYS_OS=$(uname -o || uname -s)
 CT_SYS_MACHINE=$(uname -m)
 CT_SYS_PROCESSOR=$(uname -p)
 CT_SYS_GCC=$(gcc -dumpversion)

[-- Attachment #11: use-configguess-on-bsd.patch --]
[-- Type: application/octet-stream, Size: 802 bytes --]

diff -r 160fc94ed49f scripts/crosstool-NG.sh.in
--- a/scripts/crosstool-NG.sh.in	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/crosstool-NG.sh.in	Tue Feb 02 23:11:25 2010 +0100
@@ -326,7 +326,12 @@
     # Determine build system if not set by the user
     CT_Test "You did not specify the build system. That's OK, I can guess..." -z "${CT_BUILD}"
     case "${CT_BUILD}" in
-        "") CT_BUILD=$("${CT_BUILD_PREFIX}gcc${CT_BUILD_SUFFIX}" -dumpmachine);;
+        "") if [ "$CT_SYS_OS" = "Darwin" -o "$CT_SYS_OS" = "FreeBSD" ] ; then
+                CT_BUILD=$(CT_DoConfigGuess)
+            else
+                CT_BUILD=$("${CT_BUILD_PREFIX}gcc${CT_BUILD_SUFFIX}" -dumpmachine)
+            fi
+            ;;
     esac
 
     # Prepare mangling patterns to later modify BUILD and HOST (see below)

[-- Attachment #12: whyclearCT_CFLAGS_FOR_HOST.patch --]
[-- Type: application/octet-stream, Size: 520 bytes --]

diff -r 160fc94ed49f scripts/crosstool-NG.sh.in
--- a/scripts/crosstool-NG.sh.in	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/crosstool-NG.sh.in	Tue Feb 02 23:11:25 2010 +0100
@@ -454,7 +459,7 @@
     CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/buildtools/makeinfo"
 
     # Help gcc
-    CT_CFLAGS_FOR_HOST=
+    # Why clear that ? CT_CFLAGS_FOR_HOST=
     [ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST="${CT_CFLAGS_FOR_HOST} -pipe"
 
     # Override the configured jobs with what's been given on the command line

[-- Attachment #13: wrapper-compile-commandline.patch --]
[-- Type: application/octet-stream, Size: 896 bytes --]

diff -r 160fc94ed49f scripts/build/internals.sh
--- a/scripts/build/internals.sh	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/build/internals.sh	Tue Feb 02 23:11:25 2010 +0100
@@ -55,9 +60,8 @@
                 if [ "${CT_DEBUG_CT}" = "y" ]; then
                   _t="" # If debugging crosstool-NG, don't strip the wrapper
                 fi
-                CT_DoExecLog DEBUG "${CT_HOST}-gcc"                           \
-                                   -Wall -Wextra -Wunreachable-code -Werror   \
-                                   -O3 -static ${_t}                          \
+                CT_DoExecLog DEBUG "cc" -Wall -Wextra -Werror        \
+                                   -O -D$CT_SYS_OS ${_t}             \
                                    "${CT_LIB_DIR}/scripts/wrapper.c"          \
                                    -o ".${CT_TARGET}-wrapper"
                 ;;

[-- Attachment #14: stat-portable.patch --]
[-- Type: application/octet-stream, Size: 2417 bytes --]

diff -r 160fc94ed49f scripts/build/internals.sh
--- a/scripts/build/internals.sh	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/build/internals.sh	Tue Feb 02 23:11:25 2010 +0100
@@ -68,7 +72,7 @@
         # scripts, we don't know if they would in the end spawn a binary...
         # Just skip symlinks
         for _t in "${CT_TARGET}-"*; do
-            if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then
+            if [ -z "`readlink ${_t}`" ]; then
                 CT_DoExecLog ALL mv "${_t}" ".${_t}"
                 CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}"
             fi
diff -r 160fc94ed49f scripts/functions
--- a/scripts/functions	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/functions	Tue Feb 02 23:11:25 2010 +0100
@@ -249,7 +249,17 @@
     local mode
     for dir in "${@}"; do
         [ -d "${dir}" ] || continue
-        mode="$(stat -c '%a' "$(dirname "${dir}")")"
+        case "$CT_SYS_OS" in
+            GNU/Linux)
+                mode="$(stat -c '%a' "$(dirname "${dir}")")"
+                ;;
+            Darwin|FreeBSD)
+                mode="$(stat -f '%Lp' "$(dirname "${dir}")")"
+                ;;
+            *)
+                CT_Abort "Unhandled host OS $CT_SYS_OS"
+                ;;
+        esac
         CT_DoExecLog ALL chmod u+w "$(dirname "${dir}")"
         CT_DoExecLog ALL chmod -R u+w "${dir}"
         CT_DoExecLog ALL rm -rf "${dir}"
diff -r 160fc94ed49f scripts/populate.in
--- a/scripts/populate.in	Sun Jan 31 23:04:35 2010 +0100
+++ b/scripts/populate.in	Tue Feb 02 23:11:25 2010 +0100
@@ -64,6 +64,22 @@
 _EOF_
 }
 
+# return the inode of a file in a portable way
+CT_getinode() {
+    case `uname -s` in
+        *BSD|Darwin)
+            stat -f '%i' $1
+            ;;
+        Linux)
+            stat -c '%i' $1
+            ;;
+        *)
+            echo "OS unknown";
+            exit 1
+            ;;
+    esac
+}
+
 CT_ROOT_SRC_DIR=
 CT_ROOT_DST_DIR=
 CT_LIB_LIST=
@@ -104,8 +120,8 @@
     echo "$myname: '${CT_ROOT_DST_DIR}': already exists"
     exit 1
 fi
-src_inode=$(stat -c '%i' "${CT_ROOT_SRC_DIR}/.")
-dst_inode=$(stat -c '%i' "${CT_ROOT_DST_DIR}/." 2>/dev/null || true)
+src_inode=$(CT_getinode "${CT_ROOT_SRC_DIR}/.")
+dst_inode=$(CT_getinode "${CT_ROOT_DST_DIR}/." 2>/dev/null || true)
 if [ "${src_inode}" -eq "$((dst_inode+0))" ]; then
     echo "$myname: source and destination are the same!"
     exit 1

[-- Attachment #15: Type: text/plain, Size: 71 bytes --]

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Split patch for Mac OS/ was Re: Help with Building toolchain with crosstool-ng on Mac OS X 10.6.2  (Snow Leopard)
  2010-02-02 23:24 Split patch for Mac OS/ was Re: Help with Building toolchain with crosstool-ng on Mac OS X 10.6.2 (Snow Leopard) tvb377
@ 2010-02-03 23:17 ` Yann E. MORIN
  2010-02-18 19:54 ` Yann E. MORIN
  2010-02-18 20:33 ` Yann E. MORIN
  2 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2010-02-03 23:17 UTC (permalink / raw)
  To: tvb377; +Cc: crossgcc

Hello Titus, All,

On Wednesday 03 February 2010 00:24:24 tvb377@gmx.de wrote:
> Sorry, I'm quite new to mercurial. And I guess the last step in
> "Contributing" means it wants to send emails, which I cannot provide 
> on this machine here in reasonable time.

Yes, the patches would be mailed, and upon reception, it becomes really
trivial to re-aplly the patches, in the same sequence as they are applied
on your side, keeping authorship, date...

> > > - replace all calls to readlink(1GNU) with compatible variants.
> > "readlink -e" and "readlink" are not equivalent.
> No, but
> a) ct-ng does not use libs it searches for (here only ncurses) by itself.
> b) The variable where is dropped for libs, afaik. It is also
>    questionnable if you would actually need the shared object instead of
>    the link.
> c) I'm not aware of installations where links point to links 
>    [that point to links...] that point to shared objects.
>    Then the check could in theory fail when removing the -e

And we don't care if the user's system is borken. It's his/her burden
todetect such a case. Granted.

> > gcc -dumpmachine will tell us the tuple for which it was configured, and
> > that means the prefix to use to the actual tools, which is what we need.
> Hmm, I see the point. But apparently then there is an inconsistency here
> on Darwin, be it in the gcc configuration or the configure (I think it
> was of gmp) that failed.
> Anyway, my change only is for Darwin + BSD.

Yes, I saw. I was just explaining why we used gcc -dumpmachine in this case.

> > Statically linking should hopefully speed up things. Having a /slow/
> > wrapper is not very interesting, is it? Of course, the ratio
> > time-in-wrapper / (time-in-wrapper + time-in-actual-tool) should be
> > fairly small, except for very trivial programs, where the total time
> > will anyway be almost imperceptible...
> imho, statically linking will not buy you a measurable amount of time,
> especially not when linking only to such mundane things like libc that
> are guaranteed to be in core, anyway.

As a side note, I was looking at how libtool works. Jeez... Such a lot
of shell scripting just to call the compiler/linker. That's sad... :-(
So, yes, our wrapper should be blindly fast when compared to the
auto-stuff/libtool fuzz, and especially since libc.so is cached.

Besides, static wrapper: 5558KiB
         shared wrapper:   7KiB
Woot! Let's go shared! :-/

> > > - under Darwin, use DYLD_LIBRARY_PATH in wrapper.c
> > Separate patch for that as well.
> OK. Please note that this patch requires the above cmd line patch.

That's why a proper patchseries as prepared by 'hg email' is interesting:
the patch order is maintained.

> Hope it fits now for you. Please note that
> - all patches (except for build-mpfr and using config.guess)
>   are necessary to run crosstool-ng itself.
> - all are tested except the one in populate.in

OK, see my comments below...

> Sorry for the inconvenience that these are not mercurial-sent patches.

I'll deal with that, but it may take a bit longer...

OK, for the patches now:

--> build-mpfr-on-darwin.patch          applied
--> corrected-date-sed-expr.patch       applied
--> uname-portable.patch                applied
--> nice-to-see-all-envvars.patch       applied

--> wrapper-compile-commandline.patch
diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
--- a/scripts/build/internals.sh
+++ b/scripts/build/internals.sh
@@ -55,9 +55,8 @@
                 if [ "${CT_DEBUG_CT}" = "y" ]; then
                   _t="" # If debugging crosstool-NG, don't strip the wrapper
                 fi
-                CT_DoExecLog DEBUG "${CT_HOST}-gcc"                           \
-                                   -Wall -Wextra -Wunreachable-code -Werror   \
-                                   -O3 -static ${_t}                          \
+                CT_DoExecLog DEBUG "cc" -Wall -Wextra -Werror        \
+                                   -O -D$CT_SYS_OS ${_t}             \

You broke canadian-cross and cross-native: the wrapper will have to run on
the host, not on the build machine. So we must be using ${CT_HOST}-gcc
Besides, it's space-damaged at the end of lines (line up \).

--> whyclearCT_CFLAGS_FOR_HOST.patch
Well, let's be sure the variable is empty before we add to it (in case the
user already had it in the enviornment). Notice that we do:
  CT_CFLAGS_FOR_HOST+=blabla

I'll handle the rest of the patchset after FOSDEM, i.e. next week.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Split patch for Mac OS/ was Re: Help with Building toolchain with  crosstool-ng on Mac OS X 10.6.2  (Snow Leopard)
  2010-02-02 23:24 Split patch for Mac OS/ was Re: Help with Building toolchain with crosstool-ng on Mac OS X 10.6.2 (Snow Leopard) tvb377
  2010-02-03 23:17 ` Yann E. MORIN
@ 2010-02-18 19:54 ` Yann E. MORIN
  2010-02-18 20:33 ` Yann E. MORIN
  2 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2010-02-18 19:54 UTC (permalink / raw)
  To: crossgcc; +Cc: tvb377

On Wednesday 03 February 2010 00:24:24 tvb377@gmx.de wrote:
[--SNIP--]



-- 
.-----------------.--------------------.------------------.--------------------.
|  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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Split patch for Mac OS/ was Re: Help with Building toolchain with  crosstool-ng on Mac OS X 10.6.2  (Snow Leopard)
  2010-02-02 23:24 Split patch for Mac OS/ was Re: Help with Building toolchain with crosstool-ng on Mac OS X 10.6.2 (Snow Leopard) tvb377
  2010-02-03 23:17 ` Yann E. MORIN
  2010-02-18 19:54 ` Yann E. MORIN
@ 2010-02-18 20:33 ` Yann E. MORIN
  2010-02-19  6:15   ` Titus von Boxberg
  2 siblings, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2010-02-18 20:33 UTC (permalink / raw)
  To: crossgcc; +Cc: tvb377

Hello Titus, All!

(Sorry for the previous mail, I mistakenly hit Ctrl-Enter, which sent the
mail).

On Wednesday 03 February 2010 00:24:24 tvb377@gmx.de wrote:
[--SNIP--]

Here is a further review of your patchset :

--> wrapper-compile-commandline:

As previously stated, this breaks candaian-cross. Please fix.

--> dyld-library-path-wrapper.c:

Please run the following:   gcc -E -x c - -dM </dev/null
and see if there is a macros that specifies that this is Darwin (or
some such). This would be far better than relying on uname.

--> gnu-tools:

We already have some companion tools that should take care of those.
Unfortunately, inclusion of those was not complete. Indeed, we build them
as part os the standard build procedure, and that comes after ./configure
has a chance to find them (because they do not exist yet)... Sigh...

> diff --git a/configure b/configure
> --- a/configure
> +++ b/configure
[--SNIP--]
> -has_or_abort prog="awk gawk" ver='^GNU Awk' err="GNU 'awk' was not found"
> +has_or_abort prog="gawk awk" ver='^GNU Awk' err="GNU 'awk' was not found"

Huh? Why do you need to switch the check ?

[--SNIP--]
> -has_or_abort prog=stat ver='GNU coreutils'
> +has_or_abort prog=stat

One separate patch for that, please. I want to be able to revert just this
in case it breaks later, whithout reverting the whole patch.

--> readlink:

> diff --git a/configure b/configure
> --- a/configure
> +++ b/configure
> @@ -160,7 +160,7 @@
>                  printf "Checking for '${item}'... "
>                  where="$( gcc -print-file-name="${item}" )"
>                  if [ "${where}" != "${item}" ]; then
> -                    where="$( readlink -e "${where}" )"
> +                    where="$( readlink "${where}" )"
>                      status=yes
>                      break;
>                  fi

Separate patch, please.

> diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
> --- a/scripts/build/internals.sh
> +++ b/scripts/build/internals.sh
> @@ -42,6 +42,11 @@
>          CT_DoLog EXTRA "Installing toolchain wrappers"
>          CT_Pushd "${CT_PREFIX_DIR}/bin"
>
> +        if [ "$CT_SYS_OS" = "Darwin" -o "$CT_SYS_OS" = "FreeBSD" ] ; then
> +            # wrapper does not work (when using readlink -m)
> +            CT_DoLog EXTRA "Forcing usage of binary wrappers"

CT_DoLog WARN "...."

> +            CT_TOOLS_WRAPPER="exec"
> +        fi
>          # Install the wrapper
>          case "${CT_TOOLS_WRAPPER}" in
>              script)
> diff --git a/scripts/wrapper.in b/scripts/wrapper.in
> --- a/scripts/wrapper.in
> +++ b/scripts/wrapper.in
> @@ -1,5 +1,10 @@
>  #!/bin/sh
>
> +# this wrapper will not work under BSD systems or others
> +# not containig the GNU readlink.
> +# Under those, wrapper.c will forcibly be used
> +# regardless of the config file setting.
> +

Not really needed. Put that paragraph in the documentation, please.

--> samples.mk-sed: OK, will apply! :-)

--> sed-portable:

OK, extended regular expressions are not really needed in this case.
I will apply!

Note however that there are many other places where sed is called with -r.
Did you make sure those where not impacted also?

--> stat-portable:

> diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
> --- a/scripts/build/internals.sh
> +++ b/scripts/build/internals.sh
> @@ -72,7 +72,7 @@
>          # scripts, we don't know if they would in the end spawn a
> binary... # Just skip symlinks
>          for _t in "${CT_TARGET}-"*; do
> -            if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then
> +            if [ -z "`readlink ${_t}`" ]; then 

The rest of the code uses $(...) instead of `...` Although there is
nothing wrong with `...`, I'd like to keep the code homogeneous.

And separate patch for that, please, as it's not related to the rest
of the patch.

>                  CT_DoExecLog ALL mv "${_t}" ".${_t}"
>                  CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}"
>              fi
> diff --git a/scripts/functions b/scripts/functions
> --- a/scripts/functions
> +++ b/scripts/functions
> @@ -249,7 +249,17 @@
>      local mode
>      for dir in "${@}"; do
>          [ -d "${dir}" ] || continue
> -        mode="$(stat -c '%a' "$(dirname "${dir}")")"
> +        case "$CT_SYS_OS" in
> +            GNU/Linux)
> +                mode="$(stat -c '%a' "$(dirname "${dir}")")"
> +                ;;
> +            Darwin|FreeBSD)
> +                mode="$(stat -f '%Lp' "$(dirname "${dir}")")"
> +                ;;
> +            *)
> +                CT_Abort "Unhandled host OS $CT_SYS_OS"
> +                ;;
> +        esac
>          CT_DoExecLog ALL chmod u+w "$(dirname "${dir}")"
>          CT_DoExecLog ALL chmod -R u+w "${dir}"
>          CT_DoExecLog ALL rm -rf "${dir}"

This is good. Separate patch, please.

> diff --git a/scripts/populate.in b/scripts/populate.in
> --- a/scripts/populate.in
> +++ b/scripts/populate.in
> @@ -64,6 +64,22 @@
>  _EOF_
>  }
>
> +# return the inode of a file in a portable way
> +CT_getinode() {
> +    case `uname -s` in

`...` --> $(...)

> +        *BSD|Darwin)
> +            stat -f '%i' $1

Breaks if $1 has a space; quote appropriately.

> +            ;;
> +        Linux)
> +            stat -c '%i' $1

Ditto

> +            ;;
> +        *)
> +            echo "OS unknown";

Redirect to stderr!

> +            exit 1
> +            ;;
> +    esac
> +}
> +
>  CT_ROOT_SRC_DIR=
>  CT_ROOT_DST_DIR=
>  CT_LIB_LIST=
> @@ -104,8 +120,8 @@
>      echo "$myname: '${CT_ROOT_DST_DIR}': already exists"
>      exit 1
>  fi
> -src_inode=$(stat -c '%i' "${CT_ROOT_SRC_DIR}/.")
> -dst_inode=$(stat -c '%i' "${CT_ROOT_DST_DIR}/." 2>/dev/null || true)
> +src_inode=$(CT_getinode "${CT_ROOT_SRC_DIR}/.")
> +dst_inode=$(CT_getinode "${CT_ROOT_DST_DIR}/." 2>/dev/null || true)

Oh well, stderr is consigned to oblivion here, which means you wont see
the "OS unknown" error message anyway...

>  if [ "${src_inode}" -eq "$((dst_inode+0))" ]; then
>      echo "$myname: source and destination are the same!"
>      exit 1

Separate patch, please.
Seems we can do way better here: move the '2>/dev/null || true' up into
the function.

--> use-configguess-on-bsd:

> diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
> -        "") CT_BUILD=$("${CT_BUILD_PREFIX}gcc${CT_BUILD_SUFFIX}" -dumpmachine);;
> +        "") if [ "$CT_SYS_OS" = "Darwin" -o "$CT_SYS_OS" = "FreeBSD" ] ; then
> +                CT_BUILD=$(CT_DoConfigGuess)
> +            else
> +                CT_BUILD=$("${CT_BUILD_PREFIX}gcc${CT_BUILD_SUFFIX}" -dumpmachine)
> +            fi
> +            ;;

case "${CT_SYS_OS}" in
    Darwin|FreeBSD)   CT_BUILD="$(....)";;
    *)                CT_BUILD="$(... -dumpmachine)";;
esac

Could you rework your patches, please? Thank you! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Split patch for Mac OS/ was Re: Help with Building toolchain with  crosstool-ng on Mac OS X 10.6.2  (Snow Leopard)
  2010-02-18 20:33 ` Yann E. MORIN
@ 2010-02-19  6:15   ` Titus von Boxberg
  2010-02-20 20:33     ` Yann E. MORIN
  0 siblings, 1 reply; 7+ messages in thread
From: Titus von Boxberg @ 2010-02-19  6:15 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

Hello Yann, all,

Am 18.02.2010 um 21:33 schrieb Yann E. MORIN:
>> diff --git a/configure b/configure
>> --- a/configure
>> +++ b/configure
> [--SNIP--]
>> -has_or_abort prog="awk gawk" ver='^GNU Awk' err="GNU 'awk' was not found"
>> +has_or_abort prog="gawk awk" ver='^GNU Awk' err="GNU 'awk' was not found"
> Huh? Why do you need to switch the check ?
As far as I remember has_or_abort did not check for the 2nd prog name, and
the linux boxes in my company have gawk as well, so: pure lazyness ;-)
awk is not called by ctng (at least not in incompatible
ways) and many if not all tool configures look for gawk, anyway.
Can insert that into the GNU wrapper --with-xx-list as well.

> [--SNIP--]
>> -has_or_abort prog=stat ver='GNU coreutils'
>> +has_or_abort prog=stat
> 
> One separate patch for that, please. I want to be able to revert just this
> in case it breaks later, whithout reverting the whole patch.
I kindly but strongly object.
This patch by itself does not and can not break anything for
GNU systems because stat really is a *core*util. I cannot think of a
nonbroken GNU/Linux system where stat is not from GNU.
In fact, there were only 2 major (multiple times throughout the code)
non-portability items in ctng that could and should (because of the nature
being "coreutils") not be fixed with the imo brilliant wrapper construct,
namely stat and readlink.
So, if you want to keep ctng portable in the future, keep an eye on
those two but do not revert this patch.
Reverting this patch renders portability work useless.
I would even recommend to delete the line to make it consistent
with readlink not being checked for as well, and because I
cannot think of any nonbroken system without stat.

What do you think of this?

> --> sed-portable:
> 
> OK, extended regular expressions are not really needed in this case.
> I will apply!
> 
> Note however that there are many other places where sed is called with -r.
> Did you make sure those where not impacted also?
I'm pretty sure that this is the only location where the links to GNU
tools have not yet been set up.

> --> stat-portable:
> 
>> diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
>> --- a/scripts/build/internals.sh
>> +++ b/scripts/build/internals.sh
>> @@ -72,7 +72,7 @@
>>         # scripts, we don't know if they would in the end spawn a
>> binary... # Just skip symlinks
>>         for _t in "${CT_TARGET}-"*; do
>> -            if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then
>> +            if [ -z "`readlink ${_t}`" ]; then 
> 
> The rest of the code uses $(...) instead of `...` Although there is
> nothing wrong with `...`, I'd like to keep the code homogeneous.
> 
> And separate patch for that, please, as it's not related to the rest
> of the patch.
It is related because it replaces a non portable call to stat
which is what the rest of this patch does, too.

> 
>> +            ;;
>> +        *)
>> +            echo "OS unknown";
> 
> Redirect to stderr!
CT_DoLog maybe?

>> -src_inode=$(stat -c '%i' "${CT_ROOT_SRC_DIR}/.")
>> -dst_inode=$(stat -c '%i' "${CT_ROOT_DST_DIR}/." 2>/dev/null || true)
>> +src_inode=$(CT_getinode "${CT_ROOT_SRC_DIR}/.")
>> +dst_inode=$(CT_getinode "${CT_ROOT_DST_DIR}/." 2>/dev/null || true)
> 
> Oh well, stderr is consigned to oblivion here, which means you wont see
> the "OS unknown" error message anyway...
> 
>> if [ "${src_inode}" -eq "$((dst_inode+0))" ]; then
>>     echo "$myname: source and destination are the same!"
>>     exit 1
> Separate patch, please.
> Seems we can do way better here: move the '2>/dev/null || true' up into
> the function.
Imo such a function with a name suggesting general usability
should normally complain visibly when the file was not found.
So I would opt to leave the /dev/null where it is.
Or didn't I get the message right?

> Could you rework your patches, please? Thank you! :-)
Will do so.

Regards
Titus


--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Split patch for Mac OS/ was Re: Help with Building toolchain with  crosstool-ng on Mac OS X 10.6.2  (Snow Leopard)
  2010-02-19  6:15   ` Titus von Boxberg
@ 2010-02-20 20:33     ` Yann E. MORIN
  2010-02-20 22:34       ` Titus von Boxberg
  0 siblings, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2010-02-20 20:33 UTC (permalink / raw)
  To: Titus von Boxberg; +Cc: crossgcc

Hello Titus, All!

On Friday 19 February 2010 07:15:25 Titus von Boxberg wrote:
> >> -has_or_abort prog="awk gawk" ver='^GNU Awk' err="GNU 'awk' was not found"
> >> +has_or_abort prog="gawk awk" ver='^GNU Awk' err="GNU 'awk' was not found"
> > Huh? Why do you need to switch the check ?
> As far as I remember has_or_abort did not check for the 2nd prog name, and
> the linux boxes in my company have gawk as well, so: pure lazyness ;-)
> awk is not called by ctng (at least not in incompatible
> ways) and many if not all tool configures look for gawk, anyway.
> Can insert that into the GNU wrapper --with-xx-list as well.

Well, if awk is indeed GNU awk, there's no need to test the second arg, of
course! So, this is a purely gratuituous change. Dropped.

> > [--SNIP--]
> >> -has_or_abort prog=stat ver='GNU coreutils'
> >> +has_or_abort prog=stat
> > 
> > One separate patch for that, please. I want to be able to revert just this
> > in case it breaks later, whithout reverting the whole patch.
> I kindly but strongly object.
> This patch by itself does not and can not break anything for
> GNU systems because stat really is a *core*util. I cannot think of a
> nonbroken GNU/Linux system where stat is not from GNU.

busybox' stat... Although that one supports the same formats as coreutils'.

And a system running the Linux kernel and a busybox-based userland is not
a GNU/Linux system, and I would not call that broken.

> I would even recommend to delete the line to make it consistent
> with readlink not being checked for as well, and because I
> cannot think of any nonbroken system without stat.
> What do you think of this?

I'd say that we should check for readlink also. This is an omission.

> > --> sed-portable:
> > Note however that there are many other places where sed is called with -r.
> > Did you make sure those where not impacted also?
> I'm pretty sure that this is the only location where the links to GNU
> tools have not yet been set up.

Yes. You're right. The other places use the wrapper. Thanks for pointing
this out!

> > --> stat-portable:
> > 
> >> diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
[--SNIP--]
> > And separate patch for that, please, as it's not related to the rest
> > of the patch.
> It is related because it replaces a non portable call to stat
> which is what the rest of this patch does, too.

Yes, but it fixes two different issues with stat. At least 'internals.sh'
and 'functions' can be in the same patch, but the populate hunks (below)
should be a separate patch.

> >> +            echo "OS unknown";
> > Redirect to stderr!
> CT_DoLog maybe?

Not available in populate...

> >> -src_inode=$(stat -c '%i' "${CT_ROOT_SRC_DIR}/.")
> >> -dst_inode=$(stat -c '%i' "${CT_ROOT_DST_DIR}/." 2>/dev/null || true)
> >> +src_inode=$(CT_getinode "${CT_ROOT_SRC_DIR}/.")
> >> +dst_inode=$(CT_getinode "${CT_ROOT_DST_DIR}/." 2>/dev/null || true)
> > 
> > Oh well, stderr is consigned to oblivion here, which means you wont see
> > the "OS unknown" error message anyway...
> > 
> >> if [ "${src_inode}" -eq "$((dst_inode+0))" ]; then
> >>     echo "$myname: source and destination are the same!"
> >>     exit 1
> > Separate patch, please.
> > Seems we can do way better here: move the '2>/dev/null || true' up into
> > the function.
> Imo such a function with a name suggesting general usability
> should normally complain visibly when the file was not found.
> So I would opt to leave the /dev/null where it is.
> Or didn't I get the message right?

Sorry, I was not clear enough. I meant smthg like:

CT_getinode() {
    case "$(uname -s)" in
        *BSD|Darwin) stat -f '%i' $1 2>/dev/null || true;;
        Linux)       stat -c '%i' $1 2>/dev/null || true;;
        *)           echo "OS unknown" >&2; exit 1;;
    esac
}

src_inode=$(CT_getinode "${CT_ROOT_SRC_DIR}/.")
dst_inode=$(CT_getinode "${CT_ROOT_DST_DIR}/.")

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Split patch for Mac OS/ was Re: Help with Building toolchain with  crosstool-ng on Mac OS X 10.6.2  (Snow Leopard)
  2010-02-20 20:33     ` Yann E. MORIN
@ 2010-02-20 22:34       ` Titus von Boxberg
  0 siblings, 0 replies; 7+ messages in thread
From: Titus von Boxberg @ 2010-02-20 22:34 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

Hello Yann, all,
Am 20.02.2010 um 21:33 schrieb Yann E. MORIN:
>> I would even recommend to delete the line to make it consistent
>> with readlink not being checked for as well, and because I
>> cannot think of any nonbroken system without stat.
>> What do you think of this?
> 
> I'd say that we should check for readlink also. This is an omission.
I still do not see the point.
For what do you want to check? Existence or GNU compatibility?
If the former then I'd say it's purely gratuitious, if the latter
then I cannot see a reasonable way to BSD compatibility.
And then there would be find,ls,uname,...
Where would you draw the line?

Regards
Titus


--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-02-20 22:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-02 23:24 Split patch for Mac OS/ was Re: Help with Building toolchain with crosstool-ng on Mac OS X 10.6.2 (Snow Leopard) tvb377
2010-02-03 23:17 ` Yann E. MORIN
2010-02-18 19:54 ` Yann E. MORIN
2010-02-18 20:33 ` Yann E. MORIN
2010-02-19  6:15   ` Titus von Boxberg
2010-02-20 20:33     ` Yann E. MORIN
2010-02-20 22:34       ` Titus von Boxberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).