linker fails to link objects into the libgfx_mac.dylib if -mcpu=7450 -O3 optimisations are used

RESOLVED WORKSFORME

Status

Core Graveyard
GFX: Mac
--
minor
RESOLVED WORKSFORME
15 years ago
10 years ago

People

(Reporter: Dave Chand, Assigned: Simon Fraser)

Tracking

Trunk
PowerPC
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030729
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030729

c++ -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion
-Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy
-Wno-long-long -mcpu=7450 -O3 -fsigned-char -maltivec -fpascal-strings
-traditional-cpp -fno-common -fshort-wchar -I/Developer/Headers/FlatCarbon
-F/System/Library/Frameworks -pipe  -DNDEBUG -DTRIMMED
-DDEPENDENT_LIBS="\"libgkgfx.dylib\", \"libxpcom.dylib\", \"libplds4.dylib\",
\"libplc4.dylib\", \"libnspr4.dylib\", \"libpthread.dylib\","
-I/Developer/Headers/FlatCarbon -F/System/Library/Frameworks -fPIC -arch ppc -o
libgfx_mac.dylib  nsATSUIUtils.o nsDeviceContextMac.o
nsDeviceContextSpecFactoryM.o nsDeviceContextSpecX.o nsDrawingSurfaceMac.o
nsFontMetricsMac.o nsGfxFactoryMac.o nsGraphicState.o nsImageMac.o nsRegionMac.o
nsRenderingContextMac.o nsMacUnicodeFontInfo.o nsUnicodeFontMappingMac.o
nsUnicodeMappingUtil.o nsUnicodeRenderingToolkit.o nsScreenMac.o
nsScreenManagerMac.o nsPrintOptionsX.o nsPrintSettingsX.o nsPrintSessionX.o
nsFontUtils.o nsNativeThemeMac.o  nsRenderingContextImpl.o gfxImageFrame.o
nsNativeTheme.o    -L../../../dist/bin -L../../../dist/lib -lmozutil_s -lgkgfx
-framework Carbon /System/Library/Frameworks/Carbon.framework/Carbon
-L../../../dist/bin -lxpcom -L../../../dist/bin
-L/Users/davechand/mozilla/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread  
-Wl,-exported_symbols_list
-Wl,../../../build/unix/gnu-ld-scripts/components-export-list -bundle -lm    
ld: warning -prebind has no effect with -bundle
ld: Undefined symbols:
non-virtual thunk [nv:-4] to DeviceContextImpl::QueryInterface(nsID const&, void**)
non-virtual thunk [nv:-4] to DeviceContextImpl::AddRef()
non-virtual thunk [nv:-4] to DeviceContextImpl::Observe(nsISupports*, char
const*, unsigned short const*)
non-virtual thunk [nv:-4] to DeviceContextImpl::Release()
non-virtual thunk [nv:-8] to DeviceContextImpl::QueryInterface(nsID const&, void**)
non-virtual thunk [nv:-8] to DeviceContextImpl::AddRef()
non-virtual thunk [nv:-8] to DeviceContextImpl::Release()
non-virtual thunk [nv:-4] to nsPrintOptions::QueryInterface(nsID const&, void**)
non-virtual thunk [nv:-4] to nsPrintOptions::GetNewPrintSettings(nsIPrintSettings**)
non-virtual thunk [nv:-4] to nsPrintOptions::GetDefaultPrinterName(unsigned short**)
non-virtual thunk [nv:-4] to
nsPrintOptions::GetGlobalPrintSettings(nsIPrintSettings**)
non-virtual thunk [nv:-4] to
nsPrintOptions::SavePrintSettingsToPrefs(nsIPrintSettings*, int, unsigned)
non-virtual thunk [nv:-4] to
nsPrintOptions::InitPrintSettingsFromPrefs(nsIPrintSettings*, int, unsigned)
non-virtual thunk [nv:-4] to
nsPrintOptions::InitPrintSettingsFromPrinter(unsigned short const*,
nsIPrintSettings*)
non-virtual thunk [nv:-4] to nsPrintOptions::AddRef()
non-virtual thunk [nv:-4] to nsPrintOptions::Release()
make[4]: *** [libgfx_mac.dylib] Error 1
make[3]: *** [libs] Error 2
make[2]: *** [libs] Error 2
make[1]: *** [tier_9] Error 2
make: *** [default] Error 2


Reproducible: Always

Steps to Reproduce:
1.try to build mozilla on mac os x with -O3 -mcpu=7450 optimzations
2.
3.

Actual Results:  
ld: Undefined symbols:

Expected Results:  
compile properly to give me an optimized build

i rating this bug as minor since mozilla with compile fine without the
optimization flags. But I believe that the optimizations will improve mozilla's
performance on this platform/os architecture.
(Assignee)

Comment 1

15 years ago
Does your build work without -O3 -mcpu=7450, or are you just going by tinderbox?
You are also building with -maltivec, though I don't think this will gain you
anything.
(Reporter)

Comment 2

15 years ago
The build does work without -O3 and -mcpu=7450
(Reporter)

Comment 3

15 years ago
Ok I managed to compile with the -mcpu=7450 and -O3 flags. But I had to disable
shared libs and enable static libs. And yes there is a performance improvement.

Below is my mozconfig.

# sh
# Build configuration script
#
# See http://www.mozilla.org/build/unix.html for build instructions.
#

# Options for client.mk.

# Options for 'configure' (same as command-line options).
ac_add_options --enable-default-toolkit=mac
ac_add_options --disable-mailnews
ac_add_options --disable-ldap
ac_add_options --disable-postscript
ac_add_options --disable-xprint
ac_add_options --enable-crypto
ac_add_options --disable-jsd
ac_add_options --disable-accessibility
ac_add_options --enable-plaintext-editor-only
ac_add_options --disable-composer
ac_add_options --enable-svg
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-logging
ac_add_options --enable-prebinding
ac_add_options --enable-xterm-updates
ac_add_options --disable-profilelocking
ac_add_options --prefix=/sw
ac_add_options --disable-dtd-debug
ac_add_options --disable-oji
ac_add_options --enable-macos-target=10.2
ac_add_options --enable-extensions=default,-venkman,-inspector,-irc

Updated

14 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Updated

14 years ago
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED

Comment 4

14 years ago
From the notes, nothing in Mozilla code was changed, just different compile options.

->WORKSFORME
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Updated

14 years ago
Status: REOPENED → RESOLVED
Last Resolved: 14 years ago14 years ago
Resolution: --- → WORKSFORME

Comment 5

14 years ago
*** Bug 220856 has been marked as a duplicate of this bug. ***
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.