[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#261082: glibc: Please add the '-fno-unit-at-a-time' patch from upstream for amd64/gcc-3.4 support

At Sun, 25 Jul 2004 17:19:41 +0200,
Andreas Jochens wrote:
> On 04-Jul-25 23:57, GOTO Masanori wrote:
> > Andreas Jochens wrote:
> > > Additionally, the attached patch adds
> > > 
> > > nptl_extra_cflags = -g0 -O3 -fomit-frame-pointer -D__USE_STRING_INLINES
> > > 
> > > to 'debian/sysdeps/amd64.mk' which uses '-g0' instead of the default '-g1'.
> > > This is also necessary to compile glibc with gcc-3.4.
> > 
> > Why is this needed?  Could you teach me the reason?
> Thank you for your reply.
> The '-g0' is needed because gcc-3.4 has a bug which will be triggered
> when '-g1' is used to compile nptl (please see gcc-3.4 bug #260710 in 
> the BTS). This gcc-3.4 bug is known to upstream since a while ago and 
> has been discussed on the upstream gcc developers list. However, I 
> could not find a better fix. 
> This gcc-3.4 bug is not amd64-specific, it also occurs on i386.

Hmm.  It's actually bad bug.  Applying -g0 makes libc6-dbg useless, so
I hope it should be fixed soon.  To make sure applying -g0 is only for
gcc-3.4, I modified amd64.mk as follows:

	nptl_extra_cflags = -O3 -fomit-frame-pointer -D__USE_STRING_INLINES

	# work around patch for gcc-3.4: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=260710
	BUILD_CC_VERSION := $(shell $(BUILD_CC) -dumpversion | sed 's/\([0-9]*\.[0-9]*\)\(.*\)/\1/')
	ifeq ($(BUILD_CC_VERSION),3.4)
	        nptl_extra_cflags += -g0

BTW, your patch could not be applied because of patch rejection:

	patching file ./debian/patches/fno-unit-at-a-time.dpatch
	patch: **** malformed patch at line 123:  open libc_cv_z_initfirst libc_cv_Bgroup ASFLAGS_config libc_cv_z_combreloc libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'

Please send your no-unit-at-a-time.dpatch attached as normal file, not
diff style.  amd64-libs.dpatch and control* are already reflected in
the cvs, thus we need to pay additional work to strip your patch.

-- gotom

Reply to: