Page MenuHomePhabricator

brooks (Brooks Davis)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 20 2015, 9:29 AM (394 w, 4 d)

Recent Activity

Jun 1 2022

brooks abandoned D46503: [cmake] work around a race in Sphinx..

Should no longer be needed

Jun 1 2022, 11:20 AM · Restricted Project, Restricted Project
brooks abandoned D126395: Allow build without __c11_atomic_fetch_nand.

D126710 was committed

Jun 1 2022, 10:52 AM · Restricted Project, Restricted Project

May 31 2022

brooks updated the diff for D126710: Allow build without __c11_atomic_fetch_nand.
  • Hopefully use arc correctly
May 31 2022, 4:54 PM · Restricted Project, Restricted Project
brooks updated the diff for D126710: Allow build without __c11_atomic_fetch_nand.
  • Add an explanatory comment
May 31 2022, 4:53 PM · Restricted Project, Restricted Project
brooks added a comment to D126395: Allow build without __c11_atomic_fetch_nand.

I've added D126710 as an alternative that just doesn't create the libcall functions.

May 31 2022, 10:29 AM · Restricted Project, Restricted Project
brooks requested review of D126710: Allow build without __c11_atomic_fetch_nand.
May 31 2022, 10:29 AM · Restricted Project, Restricted Project

May 26 2022

brooks added a comment to D126395: Allow build without __c11_atomic_fetch_nand.

The other alternative I considered was to not generate __atomic_fetch_nand_* symbols at all if __c11_atomic_fetch_nand isn't available. It sounds like this might be the more correct approach. It has the downside that the symbols in FreeBSD's libraries can variety depending on which compiler we're using, but doesn't emit incorrect libcalls.

May 26 2022, 1:58 PM · Restricted Project, Restricted Project
brooks added a comment to D126395: Allow build without __c11_atomic_fetch_nand.

I'm not sure if it's appropriate to use clang and compiler-rt in different versions. Added more reviewers for discussion.

May 26 2022, 9:01 AM · Restricted Project, Restricted Project

May 25 2022

brooks updated subscribers of D126395: Allow build without __c11_atomic_fetch_nand.
May 25 2022, 10:09 AM · Restricted Project, Restricted Project
brooks added a comment to D126395: Allow build without __c11_atomic_fetch_nand.

This pops up trying to build FreeBSD with LLVM 14 integrated using clang from LLVM 13 and not building a bootstrap toolchain.

May 25 2022, 10:08 AM · Restricted Project, Restricted Project
brooks requested review of D126395: Allow build without __c11_atomic_fetch_nand.
May 25 2022, 10:07 AM · Restricted Project, Restricted Project

May 23 2022

brooks added a comment to D125899: [ADT] Add copy constructor to IntervalMap.

I can verify this fixes the build on FreeBSD 13.

May 23 2022, 4:15 PM · Restricted Project, Restricted Project

May 12 2022

brooks added a comment to rG0d8cb8b399ad: DWARFVerifier: Verify CU/TU index overlap issues.

This fails to compile:

$ /usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/w/bld/org/lib/DebugInfo/DWARF -I/w/src/llvm.org/llvm/lib/DebugInfo/DWARF -I/w/bld/org/include -I/w/src/llvm.org/llvm/include -I/usr/local/include -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -fno-rtti -UNDEBUG -std=c++14 -MD -c /w/src/llvm.org/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
In file included from /w/src/llvm.org/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:8:
In file included from /w/src/llvm.org/llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h:12:
In file included from /w/src/llvm.org/llvm/include/llvm/ADT/Optional.h:19:
In file included from /w/src/llvm.org/llvm/include/llvm/ADT/Hashing.h:51:
In file included from /usr/include/c++/v1/algorithm:653:
In file included from /usr/include/c++/v1/functional:500:
In file included from /usr/include/c++/v1/__functional/function.h:20:
In file included from /usr/include/c++/v1/__memory/shared_ptr.h:22:
/usr/include/c++/v1/__memory/allocator.h:154:28: error: call to implicitly-deleted copy constructor of 'llvm::IntervalMap<unsigned int, unsigned long, 12>'
        ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
                           ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__memory/allocator_traits.h:290:13: note: in instantiation of function template specialization 'std::allocator<llvm::IntervalMap<unsigned int, unsigned long, 12>>::construct<llvm::IntervalMap<unsigned int, unsigned long, 12>, const llvm::IntervalMap<unsigned int, unsigned long, 12> &>' requested here
        __a.construct(__p, _VSTD::forward<_Args>(__args)...);
            ^
/usr/include/c++/v1/vector:1085:25: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<llvm::IntervalMap<unsigned int, unsigned long, 12>>>::construct<llvm::IntervalMap<unsigned int, unsigned long, 12>, const llvm::IntervalMap<unsigned int, unsigned long, 12> &, void>' requested here
        __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos), __x);
                        ^
/usr/include/c++/v1/vector:1178:9: note: in instantiation of member function 'std::vector<llvm::IntervalMap<unsigned int, unsigned long, 12>>::__construct_at_end' requested here
        __construct_at_end(__n, __x);
        ^
/w/src/llvm.org/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:410:48: note: in instantiation of member function 'std::vector<llvm::IntervalMap<unsigned int, unsigned long, 12>>::vector' requested here
  std::vector<IntervalMap<uint32_t, uint64_t>> Sections(
                                               ^
/w/src/llvm.org/llvm/include/llvm/ADT/IntervalMap.h:970:14: note: copy constructor of 'IntervalMap<unsigned int, unsigned long, 12>' is implicitly deleted because variant field 'leaf' has a non-trivial copy constructor
    RootLeaf leaf;
             ^
1 error generated.

What standard library is in use here? I believe it's non-conformant (& since lots of other buildbots haven't failed on this, that seems likely), possibly outdated.

LLVM requires C++14 and C++14 provides a std::vector constructor that takes a count (& not a default value) and default constructs the elements in-place without copying a singular default value.

The error is a bit misleading, as it is ultimately caused by FreeBSD defaulting to _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR in libc++, as we have done historically, to preserve ABI. This unfortunate historical accident bites us every now and then, when some code uses a non-trivial std::pair constructor.

Unfortunately the way libc++ has implemented _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR it is not easy to turn off by an end-user:

https://github.com/llvm/llvm-project/blob/main/libcxx/include/__config#L130

I think some FreeBSD ports simply bump the libc++ ABI define to 2 to 'work around' this. However, this makes your C++ binaries/libraries incompatible with the base libc++ library.

May 12 2022, 9:36 AM · Restricted Project, Restricted Project

May 11 2022

brooks added a comment to rG0d8cb8b399ad: DWARFVerifier: Verify CU/TU index overlap issues.

Here's more info:

$ c++ --version
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

Most files in /usr/include/c++/v1 match those from release/13.x:libcxx/include. Maybe there is something different in __config, but I didn't look in detail.

https://godbolt.org/z/WMrcEeW8o - it looks like these small examples do work all the way back to Clang 5... so I'm not sure what's going on with your situation.

May 11 2022, 5:02 PM · Restricted Project, Restricted Project

May 7 2022

brooks added a comment to D125142: [clang][auto-init] Remove -enable flag for "zero" mode.

It would be somewhat helpful as a transition aid if -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang remained as a no-op producing a warning (a generic unused argument warning would be fine).

May 7 2022, 11:39 AM · Restricted Project, Restricted Project

Apr 15 2022

brooks added a comment to rG7fa7b0cbd8f8: [libomptarget] Add device RTL to regression test dependencies..

This commit is breaking the ability to configure openmp as a project alongside llvm on FreeBSD. I'm getting:

$ cmake ../llvm -DLLVM_ENABLE_PROJECTS='llvm;clang;lld;openmp'
...
-- Configuring done
CMake Error at /home/bed22/git/llvm-project/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt:74 (add_dependencies):
  The dependency target "omptarget.devicertl.amdgpu" of target
  "omptarget.rtl.amdgpu" does not exist.
Apr 15 2022, 9:14 AM · Restricted Project, Restricted Project

Apr 11 2022

brooks added a comment to D123177: [libomptarget] Add device RTL to regression test dependencies..

This fails to configure in cmake when enabled as a project.

Apr 11 2022, 1:49 PM · Restricted Project, Restricted Project

Apr 8 2022

brooks added a comment to D115274: [IR][RFC] Memory region declaration intrinsic.
Apr 8 2022, 1:47 PM · Restricted Project, Restricted Project

Jan 10 2022

brooks added inline comments to D114270: [openmp][amdgpu][nfc] Simplify implicit args handling.
Jan 10 2022, 10:21 AM · Restricted Project

Dec 1 2021

brooks added a comment to D114530: [clang][scan-build] Use cc/c++ instead of gcc/g++ on FreeBSD..

Thanks, this will kill off one of the patches in our ports.

Dec 1 2021, 3:38 PM · Restricted Project

Oct 12 2021

brooks added inline comments to D111281: [flang] More work on SYSTEM_CLOCK runtime API and implementation.
Oct 12 2021, 11:33 AM · Restricted Project, Restricted Project

Oct 5 2021

brooks added a comment to D109326: [lldb] [Process/FreeBSD] Support SaveCore() using PT_COREDUMP.

This patch is sufficient to let things build, but doesn't address the tests. If there's a plan to MFC PT_COREDUMP that's probably an ok state of affairs. https://cgit.freebsd.org/ports/tree/devel/llvm-devel/files/patch-lldb-PT_COREDUMP.diff?id=7e2f156ce907e7785863d49cbd33d36f07df7eae

Oct 5 2021, 3:45 PM · Restricted Project
brooks added a comment to D109326: [lldb] [Process/FreeBSD] Support SaveCore() using PT_COREDUMP.

This needs to be guarded by the presence of PT_COREDUMP since it's a new feature. As it stands this breaks the lldb build on all supported FreeBSD releases.

Oct 5 2021, 1:12 PM · Restricted Project

Apr 8 2021

brooks added a comment to D99605: [TableGen] [Docs] Add lldb-tblgen to command guide; add 4 stubs for xxx-tblgen commands.

This results in a manpage with the filename tblgen Family.1 which quite odd.

Apr 8 2021, 1:43 PM · Restricted Project

Sep 28 2020

brooks requested review of D88453: [lldb] Fix FreeBSD Arm Process Plugin build..
Sep 28 2020, 3:24 PM · Restricted Project

Aug 24 2020

brooks added a comment to D86397: Move special va_list handling to kmp_os.h.

This seems to replace D77333

Aug 24 2020, 11:55 AM · Restricted Project

Jun 12 2020

brooks updated the diff for D77333: OpenMP: Support FreeBSD on AArch64..
  • clang-format patched lines.
Jun 12 2020, 8:38 AM · Restricted Project

Apr 2 2020

brooks created D77333: OpenMP: Support FreeBSD on AArch64..
Apr 2 2020, 1:00 PM · Restricted Project

Mar 27 2020

brooks added a comment to D76827: [lldb/CMake] Fix `install` for multi-configuration generators..

Doing a bit of naive digging suggests to me that putting this section inside an

if (NOT CMAKE_CFG_INTDIR STREQUAL  ".")

might do the trick.

Mar 27 2020, 4:32 PM · Restricted Project
brooks updated subscribers of D76827: [lldb/CMake] Fix `install` for multi-configuration generators..

The generator is Ninja. @emaste may know of a buildbot. Note that this is an install failure so I'm not sure if buildbots will catch it.

Mar 27 2020, 3:59 PM · Restricted Project
brooks added a comment to D76827: [lldb/CMake] Fix `install` for multi-configuration generators..

This is broken in a FreeBSD install.

Mar 27 2020, 3:27 PM · Restricted Project

Jul 22 2019

brooks added a comment to D7104: On FreeBSD MIPS claim and pass down the -G# argument if present when linking..

@brooks, @arichardson do we still want to pursue this?

Jul 22 2019, 2:25 PM

Sep 25 2018

brooks created D52507: Fix FreeBSD build after r342633..
Sep 25 2018, 10:17 AM
brooks added a comment to D52507: Fix FreeBSD build after r342633..

See also: D51859

Sep 25 2018, 10:17 AM
brooks added a comment to D51859: [NFC] Turn "load dependent files" boolean into an enum .

Also broke the FreeBSD build:

Sep 25 2018, 10:05 AM

May 7 2018

brooks accepted D24867: Request init/fini array on FreeBSD 12 and later.

I do think we should make this change, but don't have a strong opinion on the timing. If we do it for 12 and not 13 then we should probably try to get it into a 6.0.2.

May 7 2018, 1:16 PM

May 6 2018

brooks updated the diff for D46503: [cmake] work around a race in Sphinx..
  • Correct whitespace.
May 6 2018, 9:42 AM · Restricted Project, Restricted Project
brooks added a comment to D46503: [cmake] work around a race in Sphinx..

I've received multiple reports of this issue from FreeBSD ports users, but have never encountered it myself. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227460

May 6 2018, 9:40 AM · Restricted Project, Restricted Project
brooks created D46503: [cmake] work around a race in Sphinx..
May 6 2018, 9:37 AM · Restricted Project, Restricted Project
brooks added a reviewer for D24867: Request init/fini array on FreeBSD 12 and later: arichardson.

Adding Alex as he made some related changes to CHERI Clang recently https://github.com/CTSRD-CHERI/clang/commit/3a648766deabb4ff7f95862213c3c99e7223363c.

May 6 2018, 9:11 AM

May 29 2015

brooks added a comment to D10137: On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler..

I may just not understand how render() works, but I tried it and it didn't seem to work to replace

May 29 2015, 4:23 PM
brooks updated the diff for D10137: On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler..

Remove a spurious -mcpu from the test case.

May 29 2015, 4:21 PM
brooks added a comment to D9114: For FreeBSD on mips, pass -G options to the linker.
In D9114#181178, @dim wrote:

Even if this patch is incomplete with regards to the assembler, it is both necessary and sufficient to build and link programs with the current FreeBSD build system. It follows gcc's long established behavior as a linker and is harmless to other consumers so why not commit it?

Sure, but maybe -G for the linker is not completely useful, if the assembler also doesn't use it?

May 29 2015, 2:10 PM
brooks retitled D10137: On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler. from to On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler..
May 29 2015, 2:10 PM
brooks added a comment to D9114: For FreeBSD on mips, pass -G options to the linker.

Even if this patch is incomplete with regards to the assembler, it is both necessary and sufficient to build and link programs with the current FreeBSD build system. It follows gcc's long established behavior as a linker and is harmless to other consumers so why not commit it?

May 29 2015, 12:27 PM

Jan 21 2015

brooks added a comment to D7104: On FreeBSD MIPS claim and pass down the -G# argument if present when linking..

Add cfe-commits per message

Jan 21 2015, 11:59 AM
brooks updated the diff for D7104: On FreeBSD MIPS claim and pass down the -G# argument if present when linking..

Add a test for not passing -G0 when it isn't an argument.

Jan 21 2015, 11:58 AM
brooks retitled D7104: On FreeBSD MIPS claim and pass down the -G# argument if present when linking. from to On FreeBSD MIPS claim and pass down the -G# argument if present when linking..
Jan 21 2015, 11:37 AM