Skip to content

Shared library flags depend on uname, undesired for cross compilation  #4219

@RicBent

Description

@RicBent

Describe the bug
The shared library build options depend on the system's uname. This especially causes builds to fail when cross compiling from macOS because of the check here:

ifeq ($(UNAME), Darwin)

To Reproduce
Steps to reproduce the behavior:

  • Plattform: macOS
  • Install arm-none-eabi-gcc: brew install --cask gcc-arm-embedded
  • Use the following to build
#!/bin/bash

set -e

export ZSTD_LIB_COMPRESSION=0
export ZSTD_LIB_DECOMPRESSION=1
export ZSTD_LIB_DICTBUILDER=0
export ZSTD_LIB_DEPRECATED=0
export ZSTD_LEGACY_SUPPORT=0

export CC=$(which arm-none-eabi-gcc)
export CFLAGS="-march=armv6k+fp -mtune=mpcore -mfloat-abi=hard -mtp=soft -O3 -fomit-frame-pointer"

make lib-nomt

Expected behavior
Assignment of the shared lib flags should not depend on uname and should be configurable.

Desktop:

  • OS: macOS 15.0.1 (24A348)
  • Compiler: arm-none-eabi-gcc 14.2.1 20241119 (Arm GNU Toolchain 14.2.Rel1 (Build arm-14.52))
  • Flags: see above
  • Build system: Makefile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions