Skip to content

Commit 18de1db

Browse files
[lldb][AIX] Some base #if _AIX changes of a minimal lldb build (#120979)
This PR is in reference to porting LLDB on AIX. Link to discussions on llvm discourse and github: 1. https://discourse.llvm.org/t/port-lldb-to-ibm-aix/80640 2. #101657 The complete changes for porting are present in this draft PR: #102601 Added some base #if _AIX changes for minimal lldb build. Added a PR for clang-format changes separately, to rebase this on later: - #120978 Review Request: @labath @DavidSpickett
1 parent e438513 commit 18de1db

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,9 +730,19 @@ ConnectionStatus ConnectionFileDescriptor::ConnectFile(
730730
struct termios options;
731731
::tcgetattr(fd, &options);
732732

733-
// Set port speed to maximum
733+
// Set port speed to the available maximum
734+
#ifdef B115200
734735
::cfsetospeed(&options, B115200);
735736
::cfsetispeed(&options, B115200);
737+
#elif B57600
738+
::cfsetospeed(&options, B57600);
739+
::cfsetispeed(&options, B57600);
740+
#elif B38400
741+
::cfsetospeed(&options, B38400);
742+
::cfsetispeed(&options, B38400);
743+
#else
744+
#error "Maximum Baud rate is Unknown"
745+
#endif
736746

737747
// Raw input, disable echo and signals
738748
options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);

lldb/source/Plugins/Language/ObjC/Cocoa.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ bool lldb_private::formatters::ObjCSELSummaryProvider(
12261226
time_t lldb_private::formatters::GetOSXEpoch() {
12271227
static time_t epoch = 0;
12281228
if (!epoch) {
1229-
#ifndef _WIN32
1229+
#if !defined(_WIN32) && !defined(_AIX)
12301230
tzset();
12311231
tm tm_epoch;
12321232
tm_epoch.tm_sec = 0;

lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "ObjectContainerBSDArchive.h"
1010

11-
#if defined(_WIN32) || defined(__ANDROID__)
11+
#if defined(_WIN32) || defined(__ANDROID__) || defined(_AIX)
1212
// Defines from ar, missing on Windows
1313
#define SARMAG 8
1414
#define ARFMAG "`\n"

0 commit comments

Comments
 (0)