llvm-project/lldb/tools/Makefile

32 lines
747 B
Makefile
Raw Normal View History

##===- source/Makefile -------------------------------------*- Makefile -*-===##
Enable Linux distribution in vendor portion of host triple. This change does the following: * enables building lldb-gdbserver on linux_x86-64 platforms. Note - it builds but it has several run-time issues where many gdb remote protocol features are not properly implemented yet. I'm working on these one at a time. * lldb-gdbserver: does not enable the eLaunchFlagDebug launch flag on Linux. Currently the POSIX launch routine will assert if that flag is passed in, presumably because that launch mode is not yet available. This prevents lldb-gdbserver from asserting the moment it launches the debuggee process. * Adds ConstString& Host::GetDistributionId () This method is defined to return an empty result on all platforms except for Linux. On Linux, it makes one attempt to execute 'lsb_release -i' (both /usr/bin/lsb_release, where it appears on ubuntu, and /bin/lsb_release, where it appears on fedora if the redhat-lsb package is installed). If lsb_release is not found in either of those locations, or if 'lsb_release -i' does not return the first line starting with "Distributor ID:\t", then the distribution id is empty. The method will lower-case the id and replace whitespace with underscores. * Modify Host::GetArchitecture () so that linux replaces an unknown vendor portion with the results of GetDistributionId () if that is non-empty. This shows up now in qHostInfo remote packet responses and on the lldb host side. Tested with ubuntu and fedora (the latter both with the default of not having lsb_release installed, and with having lsb_release installed via the redhat-lsb package). Examples of triples on Linux after this change: # x86_64 Unbuntu 12.04 LTS: x86_64-ubuntu-linux-gnu # x86_64 Fedora 20 Desktop with redhat-lsb package installed x86_64-fedora-linux-gnu # x86_64 Fedora 20 Desktop without redhat-lsb-core installed # (i.e. no /bin/lsb_release available) # same as before the change x86_64--linux-gnu Note I intend to have Android respond with: {arch}-android-linux when I get to implementing Android lldb-gdbserver support. llvm-svn: 199510
2014-01-18 04:18:59 +08:00
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
Enable Linux distribution in vendor portion of host triple. This change does the following: * enables building lldb-gdbserver on linux_x86-64 platforms. Note - it builds but it has several run-time issues where many gdb remote protocol features are not properly implemented yet. I'm working on these one at a time. * lldb-gdbserver: does not enable the eLaunchFlagDebug launch flag on Linux. Currently the POSIX launch routine will assert if that flag is passed in, presumably because that launch mode is not yet available. This prevents lldb-gdbserver from asserting the moment it launches the debuggee process. * Adds ConstString& Host::GetDistributionId () This method is defined to return an empty result on all platforms except for Linux. On Linux, it makes one attempt to execute 'lsb_release -i' (both /usr/bin/lsb_release, where it appears on ubuntu, and /bin/lsb_release, where it appears on fedora if the redhat-lsb package is installed). If lsb_release is not found in either of those locations, or if 'lsb_release -i' does not return the first line starting with "Distributor ID:\t", then the distribution id is empty. The method will lower-case the id and replace whitespace with underscores. * Modify Host::GetArchitecture () so that linux replaces an unknown vendor portion with the results of GetDistributionId () if that is non-empty. This shows up now in qHostInfo remote packet responses and on the lldb host side. Tested with ubuntu and fedora (the latter both with the default of not having lsb_release installed, and with having lsb_release installed via the redhat-lsb package). Examples of triples on Linux after this change: # x86_64 Unbuntu 12.04 LTS: x86_64-ubuntu-linux-gnu # x86_64 Fedora 20 Desktop with redhat-lsb package installed x86_64-fedora-linux-gnu # x86_64 Fedora 20 Desktop without redhat-lsb-core installed # (i.e. no /bin/lsb_release available) # same as before the change x86_64--linux-gnu Note I intend to have Android respond with: {arch}-android-linux when I get to implementing Android lldb-gdbserver support. llvm-svn: 199510
2014-01-18 04:18:59 +08:00
#
##===----------------------------------------------------------------------===##
LLDB_LEVEL := ..
include $(LLDB_LEVEL)/../../Makefile.config
Enable Linux distribution in vendor portion of host triple. This change does the following: * enables building lldb-gdbserver on linux_x86-64 platforms. Note - it builds but it has several run-time issues where many gdb remote protocol features are not properly implemented yet. I'm working on these one at a time. * lldb-gdbserver: does not enable the eLaunchFlagDebug launch flag on Linux. Currently the POSIX launch routine will assert if that flag is passed in, presumably because that launch mode is not yet available. This prevents lldb-gdbserver from asserting the moment it launches the debuggee process. * Adds ConstString& Host::GetDistributionId () This method is defined to return an empty result on all platforms except for Linux. On Linux, it makes one attempt to execute 'lsb_release -i' (both /usr/bin/lsb_release, where it appears on ubuntu, and /bin/lsb_release, where it appears on fedora if the redhat-lsb package is installed). If lsb_release is not found in either of those locations, or if 'lsb_release -i' does not return the first line starting with "Distributor ID:\t", then the distribution id is empty. The method will lower-case the id and replace whitespace with underscores. * Modify Host::GetArchitecture () so that linux replaces an unknown vendor portion with the results of GetDistributionId () if that is non-empty. This shows up now in qHostInfo remote packet responses and on the lldb host side. Tested with ubuntu and fedora (the latter both with the default of not having lsb_release installed, and with having lsb_release installed via the redhat-lsb package). Examples of triples on Linux after this change: # x86_64 Unbuntu 12.04 LTS: x86_64-ubuntu-linux-gnu # x86_64 Fedora 20 Desktop with redhat-lsb package installed x86_64-fedora-linux-gnu # x86_64 Fedora 20 Desktop without redhat-lsb-core installed # (i.e. no /bin/lsb_release available) # same as before the change x86_64--linux-gnu Note I intend to have Android respond with: {arch}-android-linux when I get to implementing Android lldb-gdbserver support. llvm-svn: 199510
2014-01-18 04:18:59 +08:00
# enable lldb-gdbserver for supported platforms
DIRS :=
ifneq (,$(strip $(filter $(HOST_OS), FreeBSD Linux)))
Enable Linux distribution in vendor portion of host triple. This change does the following: * enables building lldb-gdbserver on linux_x86-64 platforms. Note - it builds but it has several run-time issues where many gdb remote protocol features are not properly implemented yet. I'm working on these one at a time. * lldb-gdbserver: does not enable the eLaunchFlagDebug launch flag on Linux. Currently the POSIX launch routine will assert if that flag is passed in, presumably because that launch mode is not yet available. This prevents lldb-gdbserver from asserting the moment it launches the debuggee process. * Adds ConstString& Host::GetDistributionId () This method is defined to return an empty result on all platforms except for Linux. On Linux, it makes one attempt to execute 'lsb_release -i' (both /usr/bin/lsb_release, where it appears on ubuntu, and /bin/lsb_release, where it appears on fedora if the redhat-lsb package is installed). If lsb_release is not found in either of those locations, or if 'lsb_release -i' does not return the first line starting with "Distributor ID:\t", then the distribution id is empty. The method will lower-case the id and replace whitespace with underscores. * Modify Host::GetArchitecture () so that linux replaces an unknown vendor portion with the results of GetDistributionId () if that is non-empty. This shows up now in qHostInfo remote packet responses and on the lldb host side. Tested with ubuntu and fedora (the latter both with the default of not having lsb_release installed, and with having lsb_release installed via the redhat-lsb package). Examples of triples on Linux after this change: # x86_64 Unbuntu 12.04 LTS: x86_64-ubuntu-linux-gnu # x86_64 Fedora 20 Desktop with redhat-lsb package installed x86_64-fedora-linux-gnu # x86_64 Fedora 20 Desktop without redhat-lsb-core installed # (i.e. no /bin/lsb_release available) # same as before the change x86_64--linux-gnu Note I intend to have Android respond with: {arch}-android-linux when I get to implementing Android lldb-gdbserver support. llvm-svn: 199510
2014-01-18 04:18:59 +08:00
ifneq (,$(strip $(filter $(HOST_ARCH), x86_64)))
DIRS += lldb-gdbserver
else
endif
else
endif
ifneq ($(HOST_OS),MingW)
Enable Linux distribution in vendor portion of host triple. This change does the following: * enables building lldb-gdbserver on linux_x86-64 platforms. Note - it builds but it has several run-time issues where many gdb remote protocol features are not properly implemented yet. I'm working on these one at a time. * lldb-gdbserver: does not enable the eLaunchFlagDebug launch flag on Linux. Currently the POSIX launch routine will assert if that flag is passed in, presumably because that launch mode is not yet available. This prevents lldb-gdbserver from asserting the moment it launches the debuggee process. * Adds ConstString& Host::GetDistributionId () This method is defined to return an empty result on all platforms except for Linux. On Linux, it makes one attempt to execute 'lsb_release -i' (both /usr/bin/lsb_release, where it appears on ubuntu, and /bin/lsb_release, where it appears on fedora if the redhat-lsb package is installed). If lsb_release is not found in either of those locations, or if 'lsb_release -i' does not return the first line starting with "Distributor ID:\t", then the distribution id is empty. The method will lower-case the id and replace whitespace with underscores. * Modify Host::GetArchitecture () so that linux replaces an unknown vendor portion with the results of GetDistributionId () if that is non-empty. This shows up now in qHostInfo remote packet responses and on the lldb host side. Tested with ubuntu and fedora (the latter both with the default of not having lsb_release installed, and with having lsb_release installed via the redhat-lsb package). Examples of triples on Linux after this change: # x86_64 Unbuntu 12.04 LTS: x86_64-ubuntu-linux-gnu # x86_64 Fedora 20 Desktop with redhat-lsb package installed x86_64-fedora-linux-gnu # x86_64 Fedora 20 Desktop without redhat-lsb-core installed # (i.e. no /bin/lsb_release available) # same as before the change x86_64--linux-gnu Note I intend to have Android respond with: {arch}-android-linux when I get to implementing Android lldb-gdbserver support. llvm-svn: 199510
2014-01-18 04:18:59 +08:00
DIRS += driver lldb-platform
endif
ifeq ($(HOST_OS),Darwin)
DIRS += debugserver
endif
include $(LLDB_LEVEL)/Makefile