It probably makes it non-open source and non-free according to OSD and FSF
https://opensource.org/docs/osd "The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research."
Hard to trace/track.
Personally, while I understand and appreciate the sentiment behind this, I don't think doing this kind of thing accomplishes very much, and I'd recommend against it. YMMV, of course.
My take is just this: if it's a deeply held ideological thing for you, then by all means, go for it. But if you want your project to be widely adopted / used, etc., then in pragmatic terms I think you'd be better served sticking with a straight-forward, conventional license. Not everybody cares about this sort of thing, but a lot of people get uneasy using projects that use "non-standard" licenses.
As others have said, if you want to make a political statement go for it and name all the companies you don't want using your software explicitly (and keep updating that when they work around you).
Personally, I wouldn't bother. If this is for a business idea, rethink your revenue strategy... licensing alone is a nightmare to enforce.