summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRod Smith <rodsmith@rodsbooks.com>2021-03-08 19:06:27 -0500
committerRod Smith <rodsmith@rodsbooks.com>2021-03-08 19:06:27 -0500
commit0d47132b76b6eb1194093f168ea611d20665eb88 (patch)
treede58e482620313275bb8fef832cfa82283961794
parent86dd5fea351a5a55bea26b7622eb85ebd6075a60 (diff)
downloadsgdisk-0d47132b76b6eb1194093f168ea611d20665eb88.tar.gz
Adjusted documentation & Makefile.mac for new ARM64 support under macOS
-rw-r--r--Makefile.mac5
-rw-r--r--NEWS10
-rw-r--r--README68
3 files changed, 47 insertions, 36 deletions
diff --git a/Makefile.mac b/Makefile.mac
index 09ae409..ea21fa6 100644
--- a/Makefile.mac
+++ b/Makefile.mac
@@ -1,7 +1,7 @@
CC=gcc
CXX=c++
# FATBINFLAGS=-arch x86_64 -arch i386 -mmacosx-version-min=10.9
-FATBINFLAGS=-arch x86_64 -mmacosx-version-min=10.9
+FATBINFLAGS=-arch x86_64 -arch arm64 -mmacosx-version-min=10.9
THINBINFLAGS=-arch x86_64 -mmacosx-version-min=10.9
CFLAGS=$(FATBINFLAGS) -O2 -D_FILE_OFFSET_BITS=64 -g
#CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -I/opt/local/include -I/usr/local/include -I/opt/local/include -g
@@ -21,7 +21,8 @@ gdisk: $(LIB_OBJS) gpttext.o gdisk.o
# $(CXX) $(LIB_OBJS) -L/usr/lib -licucore gpttext.o gdisk.o -o gdisk
cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
- $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o /usr/lib/libncurses.dylib $(LDFLAGS) $(FATBINFLAGS) -o cgdisk
+ $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o /usr/local/Cellar/ncurses/6.2/lib/libncurses.dylib $(LDFLAGS) -o cgdisk
+# $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o /usr/lib/libncurses.dylib $(LDFLAGS) -o cgdisk
# $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licucore -lncurses -o cgdisk
sgdisk: $(LIB_OBJS) gptcl.o sgdisk.o
diff --git a/NEWS b/NEWS
index a7131aa..7d29c53 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,16 @@
header claiming an invalid size of partition entries when reading
some MBR disks.
+- Added ARM64 as an architecture for the Mac builds of gdisk and fixparts.
+ The official GPT fdisk binaries of these files for macOS are now
+ "universal" x86-64/ARM64 binaries, so they will run natively on the new M1
+ (ARM64) Macs. The sgdisk and cgdisk binaries, though, remain built only
+ for x86-64, because they rely on libraries that are not easily built in
+ "universal" form.
+
+- Fixed double byte swap operation on partition label data on big-endian
+ CPUs. This resulted in partition names becoming gibberish on such CPUs.
+
1.0.6 (1/13/2021):
------------------
diff --git a/README b/README
index 8f38a1b..e52dd2c 100644
--- a/README
+++ b/README
@@ -168,8 +168,8 @@ work; however, I've not done extensive testing of the resulting binaries,
beyond checking a few basics. Under Windows, Microsoft Visual C++ 2008 can
be used instead. In addition, note these requirements:
-* On Linux, FreeBSD, OS X, and Solaris, libuuid must be installed. This is
- the standard for Linux and OS X, although you may need to install a
+* On Linux, FreeBSD, macOS, and Solaris, libuuid must be installed. This is
+ the standard for Linux and macOS, although you may need to install a
package called uuid-dev or something similar to get the headers. On
FreeBSD, the e2fsprogs-libuuid port must be installed.
@@ -177,11 +177,11 @@ be used instead. In addition, note these requirements:
Unicode partition names, is optional on all platforms except Windows, on
which it's not supported. Using this library was required to get proper
UTF-16 partition name support in GPT fdisk versions prior to 0.8.9, but
- as of that version it should not longer be required. Nonetheless, you can
+ as of that version it should no longer be required. Nonetheless, you can
use it if you're having problems with the new UTF-16 support. This
- library is normally installed in Linux and OS X, but you may need to
+ library is normally installed in Linux and macOS, but you may need to
install the development headers (libicu-dev or something similar in
- Linux; or the libicu36-dev Fink package in OS X). To compile with ICU
+ Linux; or the libicu36-dev Fink package in macOS). To compile with ICU
support, you must modify the Makefile: Look for commented-out lines that
refer to USE_UTF16, -licuuc, -licudata, or -licucore. Uncomment them and
comment out the equivalents that lack these lines.
@@ -189,17 +189,17 @@ be used instead. In addition, note these requirements:
* The cgdisk program requires the ncurses library and its development files
(headers). Most Linux distributions install ncurses by default, but you
may need to install a package called libncurses5-dev, ncurses-devel, or
- something similar to obtain the header files. These files were installed
- already on my Mac OS X development system; however, they may have been
- installed as dependencies of other programs I've installed. If you're
- having problems installing ncurses, you can compile gdisk and/or sgdisk
- without cgdisk by specifying only the targets you want to compile to
- make.
+ something similar to obtain the header files. On my macOS development
+ system, I installed the nurses Homebrew ("brew") package; however, other
+ Unix-style software repositories are available and may work for you (see
+ the next item). If you're having problems installing ncurses, you can
+ compile gdisk and/or sgdisk without cgdisk by specifying only the targets
+ you want to compile to make.
* The sgdisk program requires the popt library and its development files
(headers). Most Linux distributions install popt by default, but you may
need to install a package called popt-dev, popt-devel, or something
- similar to obtain the header files. Mac OS users can find a version of
+ similar to obtain the header files. MacOS users can find a version of
popt for Mac OS from Darwin Ports (http://popt.darwinports.com), MacPorts
(https://trac.macports.org/browser/trunk/dports/devel/popt/Portfile), Fink
(http://www.finkproject.org), or brew (http://macappstore.org/popt/);
@@ -214,35 +214,35 @@ be used instead. In addition, note these requirements:
When all the necessary development tools and libraries are installed, you
can uncompress the package and type "make" at the command prompt in the
-resulting directory. (You may need to type "make -f Makefile.mac" on Mac OS
-X, "make -f Makefile.freebsd" on FreeBSD, "make -f Makefile.solaris" on
-Solaris, or "make -f Makefile.mingw" to compile using MinGW for Windows.)
-You may also need to add header (include) directories or library
-directories by setting the CXXFLAGS environment variable or by editing the
-Makefile. The result should be program files called gdisk, cgdisk, sgdisk,
-and fixparts. Typing "make gdisk", "make cgdisk", "make sgdisk", or "make
-fixparts" will compile only the requested programs. You can use these
-programs in place or copy the files to a suitable directory, such as
-/usr/local/sbin. You can copy the man pages (gdisk.8, cgdisk.8, sgdisk.8,
-and fixparts.8) to /usr/local/man/man8 to make them available.
+resulting directory. (You must type "make -f Makefile.mac" on macOS, "make
+-f Makefile.freebsd" on FreeBSD, "make -f Makefile.solaris" on Solaris, or
+"make -f Makefile.mingw" to compile using MinGW for Windows.) You may also
+need to add header (include) directories or library directories by setting
+the CXXFLAGS environment variable or by editing the Makefile. The result
+should be program files called gdisk, cgdisk, sgdisk, and fixparts. Typing
+"make gdisk", "make cgdisk", "make sgdisk", or "make fixparts" will compile
+only the requested programs. You can use these programs in place or copy the
+files to a suitable directory, such as /usr/local/sbin. You can copy the man
+pages (gdisk.8, cgdisk.8, sgdisk.8, and fixparts.8) to /usr/local/man/man8
+to make them available.
Caveats
-------
-THIS SOFTWARE IS BETA SOFTWARE! IF IT WIPES OUT YOUR HARD DISK OR EATS YOUR
-CAT, DON'T BLAME ME! To date, I've tested the software on several USB flash
-drives, physical hard disks, and virtual disks in the QEMU and VirtualBox
-environments. Many others have now used the software on their computers, as
-well. I believe all data-corruption bugs to be squashed, but I know full well
-that the odds of my missing something are high. This is particularly true for
-large (over-2TiB) drives; my only direct testing with such disks is with
-virtual QEMU and VirtualBox disks. I've received user reports of success with
-RAID arrays over 2TiB in size, though.
+DISK PARTITIONING SOFTWARE IS DANGEROUS! Although the GPT fdisk project has
+existed since 2009, I do not claim it is entirely bug-free; in fact a glance
+at the revision history shows recent bug fixes. I believe all
+data-corruption bugs to be squashed, but I know full well that the odds of
+my missing something are high. This is particularly true for large
+(over-2TiB) drives and use in exotic environments.
My main development platform is a system running the 64-bit version of
Ubuntu Linux. I've also tested on several other 32- and 64-bit Linux
-distributions, Intel-based Mac OS X 10.6 and several later versions, 64-bit
-FreeBSD 7.1, and Windows 7 and 10.
+distributions, Intel-based macOS 10 and 11, 64-bit FreeBSD 7.1, and Windows
+7 and 10. Other environments qualify as "exotic," and even macOS and Windows
+are borderline exotic in this context, since I use Linux almost exclusively,
+and my impression is that GPT fdisk is far more commonly used on Linux than
+in other OSes.
Redistribution
--------------