Folks, I have recently committed several lib/System changes. As with previous commits, the changes work on Linux but for other platforms I'm only "guessing" at the implementation based on available documentation. Your mileage might vary. If this breaks compilation on your platform, please correct the implementation and check it in or submit patches to me and I'll check it in. Here's the details of my recent additions .. (1) Allocating RWX memory is used by the JIT Emitter for code generation and execution. The JIT software is now platform independent in this regard by using the new sys::Memory::AllocateRWX function. This function has been implemented to use variants of mmap on Unix platforms and VirtualAlloc on Win32. (2) The functions in "FileUtilities.h" for checking magic numbers and determining the type of a function have been added to the Path class. There are three new methods: has_magic_number, is_bytecode_file, and is_archive. These have been implemented as "generic Unix" functions in the lib/System/Unix directory. They *should* work on all Unix platforms. The functions haven't been implemented for Win32. (3) The sys::Process::GetPageSize() method has been implemented in two ways. Older unix systems can use the lib/System/Unix/Process.cpp implementation that is based on the old getpagesize(3) function. This has been deprecated in SUSv2 and doesn't exist in POSIX 1003.1. The new way to get this value is with sysconf(_SC_PAGE_SIZE). That implementation can be found in lib/System/Unix/SUS/Process.cpp file. If your platform supports sysconf(2), please convert the #include in platform/Process.cpp from: #include "../Unix/Process.cpp" to: #include "../Unix/SUS/Process.cpp" Sorry for the inconvenience if any of this has broken your build. Someday soon, I'll have three or four different types of machines available so I can do this testing myself. Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040911/e0a89dee/attachment.sig>
There is a typo that breaks FreeBSD: Compiling Memory.cpp In file included from /usr/home/llvm/lib/System/Memory.cpp:28: /usr/home/llvm/obj/lib/System/platform/Memory.cpp: In static member function `static void llvm::sys::Memory::ReleaseRWX(llvm::sys::Memory&)': /usr/home/llvm/obj/lib/System/platform/Memory.cpp:47: error: `sterror' undeclared (first use this function) /usr/home/llvm/obj/lib/System/platform/Memory.cpp:47: error: (Each undeclared identifier is reported only once for each function it appears in.) "sterror" should, of course, be "strerror". On Sat, 11 Sep 2004 00:13:01 -0700 Reid Spencer <reid at x10sys.com> wrote:> Folks, > > I have recently committed several lib/System changes. As with previous > commits, the changes work on Linux but for other platforms I'm only > "guessing" at the implementation based on available documentation. Your > mileage might vary. If this breaks compilation on your platform, please > correct the implementation and check it in or submit patches to me and > I'll check it in.
Jeff, Thanks for reporting this. It has been fixed in CVS head. It affected four other platforms as well (cut and paste problem). Reid. On Sat, 2004-09-11 at 13:08, Jeff Cohen wrote:> There is a typo that breaks FreeBSD: > > Compiling Memory.cpp > In file included from /usr/home/llvm/lib/System/Memory.cpp:28: > /usr/home/llvm/obj/lib/System/platform/Memory.cpp: In static member function `static void llvm::sys::Memory::ReleaseRWX(llvm::sys::Memory&)': > /usr/home/llvm/obj/lib/System/platform/Memory.cpp:47: error: `sterror' undeclared (first use this function) > /usr/home/llvm/obj/lib/System/platform/Memory.cpp:47: error: (Each undeclared identifier is reported only once for each function it appears in.) > > "sterror" should, of course, be "strerror". > > > On Sat, 11 Sep 2004 00:13:01 -0700 > Reid Spencer <reid at x10sys.com> wrote: > > > Folks, > > > > I have recently committed several lib/System changes. As with previous > > commits, the changes work on Linux but for other platforms I'm only > > "guessing" at the implementation based on available documentation. Your > > mileage might vary. If this breaks compilation on your platform, please > > correct the implementation and check it in or submit patches to me and > > I'll check it in. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040911/deb97050/attachment.sig>