@iains Could you say why ld issues all these malloc errors? This is the build from 1.1.0 branch, no patches applied to the source:
Sergey-Fedorovs-Mac:xtools_build svacchanda\$ /opt/svacchanda/xtools/bin/ld -v
ld(56401) malloc: *** error for object 0xa0430754: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
ld(56401) malloc: *** error for object 0xa04307c4: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
xtools-1.1.0 ld (unpackaged)
Based on Apple Inc. ld64-253.9
configured to support archs: ppc ppc64 i386 x86_64 x86_64h armv6 armv6m armv7 armv7s armv7m armv7em arm64
Script I used:
# Install to here.
SET(CMAKE_INSTALL_PREFIX /opt/svacchanda/xtools CACHE PATH "put it here")
SET(CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "build style")
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.6" CACHE STRING "OS X Version")
# Default install place, change if you put it somehwere different.
set(SDK_BASE /Developer/SDKs)
SET(CMAKE_OSX_SYSROOT ${SDK_BASE}/MacOSX10.6.sdk CACHE PATH "system SDK")
SET(LLVM_DEFAULT_TARGET_TRIPLE powerpc-apple-darwin10 CACHE STRING "system triple")
SET(compilers /opt/local/bin)
SET(CMAKE_C_COMPILER ${compilers}/gcc-mp-14 CACHE PATH "C")
SET(CMAKE_CXX_COMPILER ${compilers}/g++-mp-14 CACHE PATH "C++")
SET(CMAKE_C_FLAGS "-mmacosx-version-min=10.6 -pipe" CACHE STRING "c flags")
SET(CMAKE_CXX_FLAGS "-mmacosx-version-min=10.6 -pipe" CACHE STRING "cxx flags")
# This leaves assertions on.
SET(CMAKE_C_FLAGS_MINSIZEREL "-Os" CACHE STRING "c opt flags")
SET(CMAKE_CXX_FLAGS_MINSIZEREL "-Os" CACHE STRING "cxx opt flags")
# If we're building with my GCC, then avoid carrying around a shared lib.
set(CMAKE_EXE_LINKER_FLAGS "-static-libstdc++ -static-libgcc " CACHE STRING "toolchain exe ldflags")
set(CMAKE_SHARED_LINKER_FLAGS "-static-libstdc++ -static-libgcc " CACHE STRING "toolchain shlib ldflags")
# If your host is 64b.
set(XTOOLS_HOST_IS_64B NO CACHE BOOL "host native bitwidth")
# Do not link to libc++ based on support for stdlib_flag
set(XTOOLS_CXX_HAS_STDLIB_FLAG NO CACHE BOOL "link to libc++ instead of libstdc++")
set(XTOOLS_BUGURL "https://githb.com/iains/darwin-xtools/issues" CACHE STRING "bug url")
P. S. I also tried via MacPorts port (dropping existing patches and using 1.1.0 branch) with the same result. I also tried using gcc10-bootstrap as the compiler, with the same result.
Other tools do not output malloc errors.
@iains Could you say why
ldissues all thesemallocerrors? This is the build from 1.1.0 branch, no patches applied to the source:Script I used:
P. S. I also tried via MacPorts port (dropping existing patches and using 1.1.0 branch) with the same result. I also tried using
gcc10-bootstrapas the compiler, with the same result.Other tools do not output
mallocerrors.