osdir.com
mailing list archive

Subject: [PATCH] posix shell syntax - msg#00036

List: linux.colinux.devel

Date: Prev Next Index Thread: Prev Next Index
Use posix shell syntax only (for dash).
Change all ". file" into ". ./file"

--
Henry Nestler
# Use posix shell syntax only (for dash).
# Change all ". file" into ". ./file"
#
# Revision: 425313909c448b5b30e5d1e34b1f18c72379e0ef
# Date: 2005-10-13T13:51:10
# Branch: org.colinux.devel
#
# Henry@xxxxxxxxxx

# patch "Makefile.winnt"
# patch "bin/build-all.sh"
# patch "bin/build-colinux-libs.sh"
# patch "bin/build-colinux.sh"
# patch "bin/build-common.sh"
# patch "bin/build-cross.sh"
# patch "bin/build-kernel.sh"
# patch "configure"
# patch "src/colinux/os/winnt/user/install/colinux_def.sh"
# patch "src/colinux/os/winnt/user/install/premaid.sh"
#
============================================================
--- Makefile.winnt fe0548a80ec11fe1a14e892872f2e192ee5902ea
+++ Makefile.winnt a2841f4ebb34450d032d7da9a245c2e6036a31f7
@@ -27,13 +27,13 @@

# Download only all missing sources (for cross compile)
download:
- @cd bin && . build-common.sh --download-all
+ @cd bin && . ./build-common.sh --download-all

# Create a pre-distributabel package as ZIP
package:
- @cd bin && . build-common.sh --package
+ @cd bin && . ./build-common.sh --package

# Create installer (need wine and running X11)
installer:
- @cd src/colinux/os/winnt/user/install && . premaid.sh
+ @cd src/colinux/os/winnt/user/install && . ./premaid.sh
@cd src && make installer
============================================================
--- bin/build-all.sh d59229bc56bb577407ab34b8ab8d0bf5afee3925
+++ bin/build-all.sh 6e3174f0f1bb0a560e1cb544d3bad81c8a3e0a94
@@ -1,4 +1,4 @@
#!/bin/sh

-. build-common.sh
+. ./build-common.sh
build_all $@
============================================================
--- bin/build-colinux-libs.sh ba9dcb7bb2e284c451894845b2d137305b7b1bbc
+++ bin/build-colinux-libs.sh 120f24296e2fd87e96af498f7c02a377b69c7c7b
@@ -1,8 +1,8 @@
#!/bin/sh

# Build libraries for cross platform mingw32

-. build-common.sh
+. ./build-common.sh

# Store version of installed libs here
VERSION_CACHE="$PREFIX/$TARGET/include"
============================================================
--- bin/build-colinux.sh c9777bfe4c3f44d499003dae4591872cdc11f367
+++ bin/build-colinux.sh 18b294705c980e4843705a6e5585c3148614bf47
@@ -1,8 +1,8 @@
#!/bin/sh

# Build colinux daemons from cross platform. Read doc/building

-. build-common.sh
+. ./build-common.sh

# Need Variable in make
export COLINUX_TARGET_KERNEL_PATH
============================================================
--- bin/build-common.sh 78ee435cdff0b661c08f80093b220f4115d04226
+++ bin/build-common.sh 7431bef75cd3e7740e479291f38ff821bdd3f049
@@ -33,10 +33,10 @@
# Use User config, if exist
if [ -f user-build.cfg ] ; then
# Users directories
- . user-build.cfg
+ . ./user-build.cfg
else
# fall back to default config
- . sample.user-build.cfg
+ . ./sample.user-build.cfg
fi

# what flavor are we building?
============================================================
--- bin/build-cross.sh a811bfe1e1d7a7eb3dcc880fc86321a24d51dc57
+++ bin/build-cross.sh 58aff4b0faad6311bb4794425c7ec6a037d64bf8
@@ -1,8 +1,8 @@
#!/bin/sh

# Build cross platform mingw32.

-. build-common.sh
+. ./build-common.sh

download_files()
{
============================================================
--- bin/build-kernel.sh ecaa405f636702ba1b32d7ffd10454ffb0d2374c
+++ bin/build-kernel.sh 11d35dcb8ee618718e7b7b6757601b5f2e64cb71
@@ -10,7 +10,7 @@
# Disable md5sum. untar and patch source.
# Overwrite all old source!

-. build-common.sh
+. ./build-common.sh

download_files()
{
============================================================
--- configure a93af0595c72f8a34f193bd7eff7d6913352cbbb
+++ configure 53d81f158efc86daa826dc3bee4995e769d62207
@@ -11,7 +11,7 @@
# ./configure --help

# Some defaults from config file (Kernel version and dir, binutil version)
-cd bin; . build-common.sh --get-vars; cd ..
+cd bin; . ./build-common.sh --get-vars; cd ..

# Some default values
target=i686-pc-mingw32
============================================================
--- src/colinux/os/winnt/user/install/colinux_def.sh
867c098fc6cd15f6b2c415090056ebbbb76f1f1c
+++ src/colinux/os/winnt/user/install/colinux_def.sh
92532a76ea42f22594efe9c7a712fc9cdcf3f2fa
@@ -11,7 +11,7 @@
TARGET_FILE=$2

# Get kernel version
-KERNEL_VERSION=`cd bin; . build-common.sh --get-vars; echo \$KERNEL_VERSION`
+KERNEL_VERSION=`cd bin; . ./build-common.sh --get-vars; echo \$KERNEL_VERSION`

# coLinux full version with "-preXX", if exist
PRE_VERSION=`cat $1`
============================================================
--- src/colinux/os/winnt/user/install/premaid.sh
45c69cfaea086b6302ad8fbcde32cdd7b8e06c43
+++ src/colinux/os/winnt/user/install/premaid.sh
545823e2ee54a9a4fee934c9a8d8925fa77eb333
@@ -7,7 +7,7 @@
THISDIR=`pwd`

# get configure
-cd ${TOPDIR}/bin; . build-common.sh; cd $THISDIR
+cd ${TOPDIR}/bin; . ./build-common.sh; cd $THISDIR

PATH="$PREFIX/bin:$PATH"
STRIP="$TARGET-strip --strip-all"
Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

[PATCH] no error output, if debug output fails

* colinux-daemon: Supress error message about not existing driver from 'co_debug_start()', for commands --status-driver and --install-driver. This is general for all daemons: No error about failed debug output. -- Henry Nestler # * colinux-daemon: Supress error message about not existing driver from # 'co_debug_start()', for commands --status-driver and --install-driver. # This is general for all daemons: No error about failed debug output. # # Revision: 425313909c448b5b30e5d1e34b1f18c72379e0ef # Date: 2005-10-13T13:51:10 # Branch: org.colinux.devel # # Henry@xxxxxxxxxx # patch "src/colinux/os/user/manager.h" # patch "src/colinux/os/winnt/user/manager.c" # patch "src/colinux/user/debug.c" # ============================================================ --- src/colinux/os/user/manager.h d83b5106f4a81263cc07cc932886f5defb2d2d2e +++ src/colinux/os/user/manager.h 101b63f9e6eb94a9c6eec5d3f73e5344d9d6d8f3 @@ -19,6 +19,7 @@ typedef struct co_manager_handle *co_manager_handle_t; extern co_manager_handle_t co_os_manager_open(void); +extern co_manager_handle_t co_os_manager_open_quite(void); extern void co_os_manager_close(co_manager_handle_t handle); extern co_rc_t co_os_manager_ioctl( ============================================================ --- src/colinux/os/winnt/user/manager.c e0b8ac7a90597c5cb0d122611d923cda0378578f +++ src/colinux/os/winnt/user/manager.c 4fab3570969a664787a84cd644910e50e318d6a1 @@ -26,7 +26,7 @@ #include "manager.h" #include "reactor.h" -co_manager_handle_t co_os_manager_open(void) +static co_manager_handle_t co_os_manager_open_(int verbose) { co_manager_handle_t handle; @@ -40,7 +40,8 @@ FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL); if (handle->handle == INVALID_HANDLE_VALUE) { - co_terminal_print_last_error("colinux: manager open"); + if (verbose) + co_terminal_print_last_error("colinux: manager open"); co_os_free(handle); return NULL; } @@ -48,6 +49,16 @@ return handle; } +co_manager_handle_t co_os_manager_open(void) +{ + return co_os_manager_open_(1); +} + +co_manager_handle_t co_os_manager_open_quite(void) +{ + return co_os_manager_open_(0); +} + void co_os_manager_close(co_manager_handle_t handle) { CloseHandle(handle->handle); ============================================================ --- src/colinux/user/debug.c 50df9452b1eb4469afce32acff872c2903bb3ef9 +++ src/colinux/user/debug.c 5d62056c64554ac0588d76d062d5219cfe6ade86 @@ -22,7 +22,7 @@ if (handle != NULL) return; - handle = co_os_manager_open(); + handle = co_os_manager_open_quite(); if (handle) { co_rc_t rc; co_manager_ioctl_debug_levels_t levels = {{0}, };

Next Message by Date: click to view message preview

[PATCH] NULL-Pointer on all "throw" in C++ programs

Solve problems with non init of section ctors from crtend.o, the NULL-Pointer on all "throw" in C++ programs. For colinux daemons they are: colinux-net-daemon.exe, colinux-console-fltk.exe and colinux-console-nt.exe Cross platform changed, you should rebuild your binutils! Adding a patch for binutils. NEW FILE! This file can also use for 2.16.91-20050827-1 and gcc 3.4.4 later. Revision: 425313909c448b5b30e5d1e34b1f18c72379e0ef Date: 2005-10-13T13:51:10 Branch: org.colinux.devel You can read the full storry here: http://www.henrynestler.com/colinux/patches/devel/throw-readme.txt -- Henry Nestler # Solve problems with non init of section ctors from crtend.o, the # NULL-Pointer on all "throw" in C++ programs. # For colinux daemons they are: colinux-net-daemon.exe, # colinux-console-fltk.exe and colinux-console-nt.exe # # Cross platform changed, you should rebuild your binutils! # # Adding a patch for binutils. NEW FILE! # This file can also use for 2.16.91-20050827-1 and gcc 3.4.4 later. # # Revision: 425313909c448b5b30e5d1e34b1f18c72379e0ef # Date: 2005-10-13T13:51:10 # Branch: org.colinux.devel # # Henry@xxxxxxxxxx # add_file "patch/binutils-2.15.91-20040904-1.diff" # # patch "bin/build-common.sh" # patch "bin/build-cross.sh" # patch "patch/binutils-2.15.91-20040904-1.diff" # ============================================================ --- bin/build-common.sh 78ee435cdff0b661c08f80093b220f4115d04226 +++ bin/build-common.sh 86501c215dd59075c5d36f31e0f019d55e0f91b8 @@ -64,6 +64,7 @@ BINUTILS_RELEASE="$BINUTILS_VERSION-20040904-1" BINUTILS=binutils-$BINUTILS_RELEASE BINUTILS_ARCHIVE=$BINUTILS-src.tar.gz +BINUTILS_PATCH="patch/$BINUTILS.diff" GCC_VERSION="3.3.1" GCC_RELEASE="$GCC_VERSION-20030804-1" ============================================================ --- bin/build-cross.sh a811bfe1e1d7a7eb3dcc880fc86321a24d51dc57 +++ bin/build-cross.sh f0b2ddc08e1aefc8fa971727092ea30327f147a2 @@ -64,6 +64,16 @@ gzip -dc "$SRCDIR/$BINUTILS_ARCHIVE" | tar x } +patch_binutils() +{ + if [ "$BINUTILS_PATCH" != "" ]; then + echo "Patching binutils" + cd "$BUILD_DIR/$BINUTILS" + patch -p1 < "$TOPDIR/$BINUTILS_PATCH" + test $? -ne 0 && error_exit 10 "patch binutils failed" + fi +} + configure_binutils() { echo "Configuring binutils" @@ -190,6 +200,7 @@ install_libs extract_binutils + patch_binutils configure_binutils build_binutils install_binutils ============================================================ --- patch/binutils-2.15.91-20040904-1.diff +++ patch/binutils-2.15.91-20040904-1.diff cd78c04d93f390ec1e7a217fa59c4965a30ec476 @@ -0,0 +1,22 @@ +# Cross compile from linux for mingw32 don't init the ctors from crtend.o! +# Every 'throw' in a program crashes with a "NULL-Pointer read". +# +--- binutils-2.15.91-20040904-1/ld/scripttempl/pe.sc.old ++++ binutils-2.15.91-20040904-1/ld/scripttempl/pe.sc +@@ -66,14 +66,14 @@ + *(EXCLUDE_FILE (*crtend.o) .ctors); + *(.ctor); + *(SORT(.ctors.*)); +- *crtend.o (.ctors); ++ *(.ctors); + LONG (0); } + ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; + LONG (-1); + *(EXCLUDE_FILE (*crtend.o) .dtors); + *(.dtor); + *(SORT(.dtors.*)); +- *crtend.o (.dtors); ++ *(.dtors); + LONG (0); } + ${RELOCATING+ *(.fini)} + /* ??? Why is .gcc_exc here? */

Previous Message by Thread: click to view message preview

[PATCH] no error output, if debug output fails

* colinux-daemon: Supress error message about not existing driver from 'co_debug_start()', for commands --status-driver and --install-driver. This is general for all daemons: No error about failed debug output. -- Henry Nestler # * colinux-daemon: Supress error message about not existing driver from # 'co_debug_start()', for commands --status-driver and --install-driver. # This is general for all daemons: No error about failed debug output. # # Revision: 425313909c448b5b30e5d1e34b1f18c72379e0ef # Date: 2005-10-13T13:51:10 # Branch: org.colinux.devel # # Henry@xxxxxxxxxx # patch "src/colinux/os/user/manager.h" # patch "src/colinux/os/winnt/user/manager.c" # patch "src/colinux/user/debug.c" # ============================================================ --- src/colinux/os/user/manager.h d83b5106f4a81263cc07cc932886f5defb2d2d2e +++ src/colinux/os/user/manager.h 101b63f9e6eb94a9c6eec5d3f73e5344d9d6d8f3 @@ -19,6 +19,7 @@ typedef struct co_manager_handle *co_manager_handle_t; extern co_manager_handle_t co_os_manager_open(void); +extern co_manager_handle_t co_os_manager_open_quite(void); extern void co_os_manager_close(co_manager_handle_t handle); extern co_rc_t co_os_manager_ioctl( ============================================================ --- src/colinux/os/winnt/user/manager.c e0b8ac7a90597c5cb0d122611d923cda0378578f +++ src/colinux/os/winnt/user/manager.c 4fab3570969a664787a84cd644910e50e318d6a1 @@ -26,7 +26,7 @@ #include "manager.h" #include "reactor.h" -co_manager_handle_t co_os_manager_open(void) +static co_manager_handle_t co_os_manager_open_(int verbose) { co_manager_handle_t handle; @@ -40,7 +40,8 @@ FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL); if (handle->handle == INVALID_HANDLE_VALUE) { - co_terminal_print_last_error("colinux: manager open"); + if (verbose) + co_terminal_print_last_error("colinux: manager open"); co_os_free(handle); return NULL; } @@ -48,6 +49,16 @@ return handle; } +co_manager_handle_t co_os_manager_open(void) +{ + return co_os_manager_open_(1); +} + +co_manager_handle_t co_os_manager_open_quite(void) +{ + return co_os_manager_open_(0); +} + void co_os_manager_close(co_manager_handle_t handle) { CloseHandle(handle->handle); ============================================================ --- src/colinux/user/debug.c 50df9452b1eb4469afce32acff872c2903bb3ef9 +++ src/colinux/user/debug.c 5d62056c64554ac0588d76d062d5219cfe6ade86 @@ -22,7 +22,7 @@ if (handle != NULL) return; - handle = co_os_manager_open(); + handle = co_os_manager_open_quite(); if (handle) { co_rc_t rc; co_manager_ioctl_debug_levels_t levels = {{0}, };

Next Message by Thread: click to view message preview

[PATCH] NULL-Pointer on all "throw" in C++ programs

Solve problems with non init of section ctors from crtend.o, the NULL-Pointer on all "throw" in C++ programs. For colinux daemons they are: colinux-net-daemon.exe, colinux-console-fltk.exe and colinux-console-nt.exe Cross platform changed, you should rebuild your binutils! Adding a patch for binutils. NEW FILE! This file can also use for 2.16.91-20050827-1 and gcc 3.4.4 later. Revision: 425313909c448b5b30e5d1e34b1f18c72379e0ef Date: 2005-10-13T13:51:10 Branch: org.colinux.devel You can read the full storry here: http://www.henrynestler.com/colinux/patches/devel/throw-readme.txt -- Henry Nestler # Solve problems with non init of section ctors from crtend.o, the # NULL-Pointer on all "throw" in C++ programs. # For colinux daemons they are: colinux-net-daemon.exe, # colinux-console-fltk.exe and colinux-console-nt.exe # # Cross platform changed, you should rebuild your binutils! # # Adding a patch for binutils. NEW FILE! # This file can also use for 2.16.91-20050827-1 and gcc 3.4.4 later. # # Revision: 425313909c448b5b30e5d1e34b1f18c72379e0ef # Date: 2005-10-13T13:51:10 # Branch: org.colinux.devel # # Henry@xxxxxxxxxx # add_file "patch/binutils-2.15.91-20040904-1.diff" # # patch "bin/build-common.sh" # patch "bin/build-cross.sh" # patch "patch/binutils-2.15.91-20040904-1.diff" # ============================================================ --- bin/build-common.sh 78ee435cdff0b661c08f80093b220f4115d04226 +++ bin/build-common.sh 86501c215dd59075c5d36f31e0f019d55e0f91b8 @@ -64,6 +64,7 @@ BINUTILS_RELEASE="$BINUTILS_VERSION-20040904-1" BINUTILS=binutils-$BINUTILS_RELEASE BINUTILS_ARCHIVE=$BINUTILS-src.tar.gz +BINUTILS_PATCH="patch/$BINUTILS.diff" GCC_VERSION="3.3.1" GCC_RELEASE="$GCC_VERSION-20030804-1" ============================================================ --- bin/build-cross.sh a811bfe1e1d7a7eb3dcc880fc86321a24d51dc57 +++ bin/build-cross.sh f0b2ddc08e1aefc8fa971727092ea30327f147a2 @@ -64,6 +64,16 @@ gzip -dc "$SRCDIR/$BINUTILS_ARCHIVE" | tar x } +patch_binutils() +{ + if [ "$BINUTILS_PATCH" != "" ]; then + echo "Patching binutils" + cd "$BUILD_DIR/$BINUTILS" + patch -p1 < "$TOPDIR/$BINUTILS_PATCH" + test $? -ne 0 && error_exit 10 "patch binutils failed" + fi +} + configure_binutils() { echo "Configuring binutils" @@ -190,6 +200,7 @@ install_libs extract_binutils + patch_binutils configure_binutils build_binutils install_binutils ============================================================ --- patch/binutils-2.15.91-20040904-1.diff +++ patch/binutils-2.15.91-20040904-1.diff cd78c04d93f390ec1e7a217fa59c4965a30ec476 @@ -0,0 +1,22 @@ +# Cross compile from linux for mingw32 don't init the ctors from crtend.o! +# Every 'throw' in a program crashes with a "NULL-Pointer read". +# +--- binutils-2.15.91-20040904-1/ld/scripttempl/pe.sc.old ++++ binutils-2.15.91-20040904-1/ld/scripttempl/pe.sc +@@ -66,14 +66,14 @@ + *(EXCLUDE_FILE (*crtend.o) .ctors); + *(.ctor); + *(SORT(.ctors.*)); +- *crtend.o (.ctors); ++ *(.ctors); + LONG (0); } + ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; + LONG (-1); + *(EXCLUDE_FILE (*crtend.o) .dtors); + *(.dtor); + *(SORT(.dtors.*)); +- *crtend.o (.dtors); ++ *(.dtors); + LONG (0); } + ${RELOCATING+ *(.fini)} + /* ??? Why is .gcc_exc here? */
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by