* Re: [PATCH] Add -nodefaultlibs while compiling against klibc
2003-11-25 17:30 [PATCH] Add -nodefaultlibs while compiling against klibc Martin Hicks
@ 2003-12-02 1:13 ` Greg KH
2003-12-07 21:55 ` Olaf Hering
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2003-12-02 1:13 UTC (permalink / raw)
To: linux-hotplug
On Tue, Nov 25, 2003 at 12:30:46PM -0500, Martin Hicks wrote:
> Greg,
>
> This patch adds -nodefaultlibs to LDFLAGS when compiling udev against
> klibc. This fixes the warning that I was getting when using $(LD)=gcc
> in the versions after Makefile.klibc disappeared. The problem was that
> it was still including a "-lc" in the call to the linker.
Thanks, I've applied this.
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] Add -nodefaultlibs while compiling against klibc
2003-11-25 17:30 [PATCH] Add -nodefaultlibs while compiling against klibc Martin Hicks
2003-12-02 1:13 ` Greg KH
@ 2003-12-07 21:55 ` Olaf Hering
2003-12-08 10:02 ` Arnd Bergmann
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2003-12-07 21:55 UTC (permalink / raw)
To: linux-hotplug
On Tue, Nov 25, Martin Hicks wrote:
> Greg,
>
> This patch adds -nodefaultlibs to LDFLAGS when compiling udev against
> klibc. This fixes the warning that I was getting when using $(LD)=gcc
> in the versions after Makefile.klibc disappeared. The problem was that
> it was still including a "-lc" in the call to the linker.
this gives me linker errors on ppc and ia64:
+ make udevdir=/dev KLIBC=true DEBUGúlse
gcc --static --nostdlib -nostartfiles -nodefaultlibs -o udev /usr/src/packages/BUILD/udev-008/klibc/klibc/crt0.o udev.o udev_config.o udev-add.o udev-remove.o udevdb.o logging.o namedev.o namedev_parse.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_bus.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_class.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_device.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_dir.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_driver.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_utils.o /usr/src/packages/BUILD/udev-008/libsysfs/dlist.o tdb/tdb.o tdb/spinlock.o klibc_fixups.o /usr/src/packages/BUILD/udev-008/klibc/klibc/libc.a
tdb/tdb.o(.text+0x1092): In function `tdb_chainunlock_read':
: undefined reference to `__umodsi3'
tdb/tdb.o(.text+0x1132): In function `tdb_chainunlock':
: undefined reference to `__umodsi3'
tdb/tdb.o(.text+0x15c2): In function `tdb_chainlock_read':
: undefined reference to `__umodsi3'
tdb/tdb.o(.text+0x1662): In function `tdb_chainlock':
: undefined reference to `__umodsi3'
tdb/tdb.o(.text+0x2212): In function `tdb_lockkeys':
: undefined reference to `__umodsi3'
tdb/tdb.o(.text+0x2232): more undefined references to `__umodsi3' follow
/usr/src/packages/BUILD/udev-008/klibc/klibc/libc.a(vsnprintf.o)(.text+0x6e2): In function `vsnprintf':
: undefined reference to `__udivdi3'
/usr/src/packages/BUILD/udev-008/klibc/klibc/libc.a(vsnprintf.o)(.text+0x7a2): In function `vsnprintf':
: undefined reference to `__divsi3'
/usr/src/packages/BUILD/udev-008/klibc/klibc/libc.a(vsnprintf.o)(.text+0xaf2): In function `vsnprintf':
: undefined reference to `__umoddi3'
/usr/src/packages/BUILD/udev-008/klibc/klibc/libc.a(vsnprintf.o)(.text+0xb22): In function `vsnprintf':
: undefined reference to `__udivdi3'
collect2: ld returned 1 exit status
make: *** [udev] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.66470 (%build)
I did that for ppc, against current bk:
diff -purNx linux udev-008.orig/klibc/klibc/arch/ppc/Makefile.inc udev-008/klibc/klibc/arch/ppc/Makefile.inc
--- udev-008.orig/klibc/klibc/arch/ppc/Makefile.inc 2002-08-17 02:54:27.000000000 +0200
+++ udev-008/klibc/klibc/arch/ppc/Makefile.inc 2003-12-07 22:40:05.000000000 +0100
@@ -8,7 +8,12 @@
#
ARCHOBJS = \
- arch/$(ARCH)/setjmp.o
+ arch/$(ARCH)/setjmp.o \
+ libgcc/__divdi3.o \
+ libgcc/__moddi3.o \
+ libgcc/__udivdi3.o \
+ libgcc/__umoddi3.o \
+ libgcc/__udivmoddi4.o
ARCHSOOBJS = $(patsubst %.o,%.lo,$(ARCHOBJS))
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] Add -nodefaultlibs while compiling against klibc
2003-11-25 17:30 [PATCH] Add -nodefaultlibs while compiling against klibc Martin Hicks
2003-12-02 1:13 ` Greg KH
2003-12-07 21:55 ` Olaf Hering
@ 2003-12-08 10:02 ` Arnd Bergmann
2003-12-08 15:38 ` Martin Hicks
2003-12-08 19:17 ` Olaf Hering
4 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2003-12-08 10:02 UTC (permalink / raw)
To: linux-hotplug
On Sunday 07 December 2003 22:55, Olaf Hering wrote:
>
> this gives me linker errors on ppc and ia64:
>
> tdb/tdb.o(.text+0x1092): In function `tdb_chainunlock_read':
> : undefined reference to `__umodsi3'
Does this help?
diff -Nru a/Makefile b/Makefile
--- a/Makefile Tue Nov 25 12:26:18 2003
+++ b/Makefile Tue Nov 25 12:26:18 2003
@@ -124,7 +124,7 @@
-I$(INCLUDE_DIR)/bits$(BITSIZE) -I$(GCCINCDIR) -Iklibc/linux/include \
-D__KLIBC__
LIB_OBJS - LDFLAGS = --static --nostdlib -nostartfiles -nodefaultlibs
+ LDFLAGS = --static --nostdlib -nostartfiles -nodefaultlibs -lgcc
else
CRT0 LIBC
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Add -nodefaultlibs while compiling against klibc
2003-11-25 17:30 [PATCH] Add -nodefaultlibs while compiling against klibc Martin Hicks
` (2 preceding siblings ...)
2003-12-08 10:02 ` Arnd Bergmann
@ 2003-12-08 15:38 ` Martin Hicks
2003-12-08 19:17 ` Olaf Hering
4 siblings, 0 replies; 6+ messages in thread
From: Martin Hicks @ 2003-12-08 15:38 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 806 bytes --]
On Mon, 2003-12-08 at 05:02, Arnd Bergmann wrote:
> On Sunday 07 December 2003 22:55, Olaf Hering wrote:
> >
> > this gives me linker errors on ppc and ia64:
> >
>
> > tdb/tdb.o(.text+0x1092): In function `tdb_chainunlock_read':
> > : undefined reference to `__umodsi3'
>
>
> Does this help?
Nope. I had to do something very similar to what Olaf posted for ppc to
get ia64 to compile again. Judging from the Makefile.inc in other
arches this is the correct thing to do.
I wonder what I compiled when I tested that patch? Obviously not a
build against klibc...
Attached is the patch that I'm going to send to the klibc list for
ia64. I'll let Olaf send the ppc fixes. I don't have a ppc machine.
mh
--
Martin Hicks Wild Open Source Inc.
mort@wildopensource.com 613-266-2296
[-- Attachment #2: klibc-libgcc-fixes.diff --]
[-- Type: text/x-patch, Size: 1114 bytes --]
# This is a BitKeeper generated patch for the following project:
# Project Name: The kernel C library
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.251 -> 1.252
# klibc/arch/ia64/Makefile.inc 1.5 -> 1.6
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/12/08 mort@green.i.bork.org 1.252
# Add some libgcc object files to Makefile.inc for ia64.
# --------------------------------------------
#
diff -Nru a/klibc/arch/ia64/Makefile.inc b/klibc/arch/ia64/Makefile.inc
--- a/klibc/arch/ia64/Makefile.inc Mon Dec 8 10:28:26 2003
+++ b/klibc/arch/ia64/Makefile.inc Mon Dec 8 10:28:26 2003
@@ -10,7 +10,15 @@
ARCHOBJS = \
arch/$(ARCH)/vfork.o \
arch/$(ARCH)/setjmp.o \
- arch/$(ARCH)/pipe.o
+ arch/$(ARCH)/pipe.o \
+ libgcc/__divdi3.o \
+ libgcc/__divsi3.o \
+ libgcc/__udivdi3.o \
+ libgcc/__udivsi3.o \
+ libgcc/__umodsi3.o \
+ libgcc/__umoddi3.o \
+ libgcc/__udivmodsi4.o \
+ libgcc/__udivmoddi4.o
ARCHSOOBJS = $(patsubst %o,%.lo,%(ARCHOBJS))
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] Add -nodefaultlibs while compiling against klibc
2003-11-25 17:30 [PATCH] Add -nodefaultlibs while compiling against klibc Martin Hicks
` (3 preceding siblings ...)
2003-12-08 15:38 ` Martin Hicks
@ 2003-12-08 19:17 ` Olaf Hering
4 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2003-12-08 19:17 UTC (permalink / raw)
To: linux-hotplug
On Mon, Dec 08, Martin Hicks wrote:
> On Mon, 2003-12-08 at 05:02, Arnd Bergmann wrote:
> > On Sunday 07 December 2003 22:55, Olaf Hering wrote:
> > >
> > > this gives me linker errors on ppc and ia64:
> > >
> >
> > > tdb/tdb.o(.text+0x1092): In function `tdb_chainunlock_read':
> > > : undefined reference to `__umodsi3'
> >
> >
> > Does this help?
>
> Nope. I had to do something very similar to what Olaf posted for ppc to
> get ia64 to compile again. Judging from the Makefile.inc in other
> arches this is the correct thing to do.
s390 seems fail as well, have to verify it.
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n√úRNBERG
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread