VirtualBox

Changeset 70936 in vbox


Ignore:
Timestamp:
Feb 9, 2018 3:55:18 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120771
Message:

Additions/linux: support producing builds which work with glibc 2.3.
bugref:9112: tools: update i386 Linux Additions build tool
Add an option - VBOX_WITH_OLD_GLIBC_SUPPORT - for producing Linux Additions
builds which work with glibc 2.3, by not referencing symbols which were
introduced later, including improved versions of APIs supported in glibc 2.3,
by not using GNU_HASH tags and by not using the stack protector.

Location:
trunk
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r70929 r70936  
    46994699  TEMPLATE_VBOXR3EXE_CXXFLAGS         += $(VBOX_GCC_WERR)
    47004700 endif
     4701 ifdef VBOX_WITH_OLD_GLIBC_SUPPORT
     4702  # Use older versions of APIs which were improved in versions of glibc later
     4703  # than what we are targetting, and do not use the stack protector, which
     4704  # needs glibc 2.4 or later.
     4705  TEMPLATE_VBOXR3EXE_CXXFLAGS.linux    = \
     4706        -include $(PATH_ROOT)/include/iprt/linux/symvers.h \
     4707        $(VBOX_GCC_fno-stack-protector)
     4708  TEMPLATE_VBOXR3EXE_CFLAGS.linux      = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.linux)
     4709 endif
    47014710TEMPLATE_VBOXR3EXE_CXXFLAGS.x86        = -m32
    47024711TEMPLATE_VBOXR3EXE_CXXFLAGS.amd64      = -m64
     
    47304739TEMPLATE_VBOXR3EXE_LDFLAGS.sparc64     = -m64
    47314740TEMPLATE_VBOXR3EXE_LDFLAGS.linux       = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed)
     4741 ifdef VBOX_WITH_OLD_GLIBC_SUPPORT
     4742  # The GNU_HASH ELF tag is not supported by older systems.
     4743TEMPLATE_VBOXR3EXE_LDFLAGS.linux      += -Wl,--hash-style=sysv
     4744 endif
    47324745TEMPLATE_VBOXR3EXE_LDFLAGS.solaris     = -Wl,-z,ignore # same as VBOX_LD_as_needed
    47334746TEMPLATE_VBOXR3EXE_LDFLAGS.debug       = $(VBOX_GCC_SANITIZER_FLAGS)
     
    66896702TEMPLATE_VBOXGUESTR3XF86MOD_LIBS.$(KBUILD_TARGET)    = $(NO_SUCH_VARIABLE)
    66906703TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE)
     6704ifdef VBOX_WITH_OLD_GLIBC_SUPPORT
     6705# The GNU_HASH ELF tag is not supported by older systems.
     6706TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.linux = --hash-style=sysv
     6707endif
    66916708TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.$(KBUILD_TYPE)   = $(NO_SUCH_VARIABLE)
    66926709TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS          = -r
  • trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk

    r70126 r70936  
    6868        supc++ \
    6969        gcc_eh
     70ifdef VBOX_WITH_OLD_GLIBC_SUPPORT
     71 # This has to be in LIBS, so as to be linked in after supc++ and gcc_eh, which
     72 # depend on the symbols it provides.  Static supc++ and gcc_eh on at least
     73 # Ubuntu 17.04 contain references to __sprintf_chk and __stack_chk_fail.
     74 # Furthermore, they contain references to memcpy, which needs to be resolved
     75 # to memcpy@GLIBC_2.2.5, which we solve in a not-very-satisfactory way with a
     76 # wrapper.
     77 ifeq ($(KBUILD_TARGET),linux)
     78VBoxClient_LIBS    += \
     79        $(PATH_ROOT)/src/VBox/Additions/x11/VBoxClient/chk_stubs.c
     80VBoxClient_LDFLAGS.amd64 += \
     81        -Wl,--wrap=memcpy
     82 endif
     83endif
     84
    7085ifdef VBOX_X11_SEAMLESS_GUEST
    7186 VBoxClient_DEFS += SEAMLESS_GUEST DYNAMIC_RESIZE
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette