Re: UNIVERSAL_ARCHFLAGS

2020-02-08 Thread Joshua Root
On 2020-2-9 00:46 , Mihir Luthra wrote:
> Hi,
> 
> There is something I am not able to understand in base.
> 
> Looking into aclocal.m4, based on the version of  macOS, supported archs
> are being determined. Based on them -arch flags are constructed.
> 
> For example, if using macos 10.13, 
> UNIVERSAL_ARCHFLAGS= -arch x86_64 -arch i386.
> 
> Would adding them to CFLAGS and compiling mean that the result would be
> compatible with both x86_64 and i386? Or it it overriding the previous flag?

With clang and Apple gcc, -arch flags are cumulative.

> Doesn't it automatically default to the arch as per the os version
> without using -arch flags?

The default is up to the compiler, but sure.

> As for what it makes sense, I assume its producing library to be
> compatible with both x86_64 and i386. It is being used in
> darwintracelib1.0 and darwintracelib needs to be compatible with all
> supported archs on OS as it is getting injected into the installation.
> How important is it to support i386 as for now? Will it be okay if i386
> support is withdrawn and -arch is specified as x86_64 only?

It's important to have on all versions older than 10.14.

> Is there anyway to produce static libraries like this?
> The best option I find is libtool -static -arch_only  but that
> works only if it's a single argument.

Creating a static library from fat object files works fine as long as
there's an index. That means using the -s option with ar, or running
ranlib after creation. The usual command is "ar crs .a *.o".

- Josh


UNIVERSAL_ARCHFLAGS

2020-02-08 Thread Mihir Luthra
Hi,

There is something I am not able to understand in base.

Looking into aclocal.m4, based on the version of  macOS, supported archs
are being determined. Based on them -arch flags are constructed.

For example, if using macos 10.13,
UNIVERSAL_ARCHFLAGS= -arch x86_64 -arch i386.

Would adding them to CFLAGS and compiling mean that the result would be
compatible with both x86_64 and i386? Or it it overriding the previous flag?
Doesn't it automatically default to the arch as per the os version without
using -arch flags?

As for what it makes sense, I assume its producing library to be
compatible with both x86_64 and i386. It is being used in darwintracelib1.0
and darwintracelib needs to be compatible with all supported archs on OS as
it is getting injected into the installation. How important is it to
support i386 as for now? Will it be okay if i386 support is withdrawn and
-arch is specified as x86_64 only?

Is there anyway to produce static libraries like this?
The best option I find is libtool -static -arch_only  but that works
only if it's a single argument.

Thanks,
Mihir


Re: GSOC 20

2020-02-08 Thread Marcus Calhoun-Lopez
Greetings Pavitra,

The MacPorts GSoC wiki page is good place to start 
(https://trac.macports.org/wiki/SummerOfCode).

-Marcus

> On Feb 7, 2020, at 11:46 AM, Pavitra Behre  wrote:
> 
> Hello,
> I'm Pavitra, Pre-final year student of B.Tech - Computer Science & 
> Engineering.
> I'm very much interested in contributing to MacPorts under GSOC 20.
> Kindly guide me on the How-Tos.
> A little bit about myself: I've been coding for approximately 7 years now and 
> my primary domain used to be web development and backend development. But for 
> past year or two, I'e switched to python and MacOs. Been using UNIX based 
> systems for more than half a decade. 
> Hoping to hear soon,
> Thank you,
> Pavitra Behre